FactoryBean for creating a Quartz org.quartz.CronTrigger
instance, supporting bean-style usage for trigger configuration.
CronTrigger(Impl) itself is already a JavaBean but lacks sensible defaults.
This class uses the Spring bean name as job name, the Quartz default group ("DEFAULT")
as job group, the current time as start time, and indefinite repetition, if not specified.
This class will also register the trigger with the job name and group of
a given org.. This allows SchedulerFactoryBean
to automatically register a trigger for the corresponding JobDetail,
instead of registering the JobDetail separately.
setName, setGroup, setStartDelay, setJobDetail, SchedulerFactoryBean#setTriggers, SchedulerFactoryBean#setJobDetails
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private String | |
| private static final Map | constants
Map of constant names to constant values for the misfire instruction constants
defined in |
| private String | |
| private org. | |
| private String | |
| private String | |
| private org. | |
| private org. | |
| private int | |
| private String | |
| private int | |
| private long | |
| private Date | |
| private TimeZone |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterPropertiesSet()
Implements org. Invoked by the containing This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set. |
| public org. | |
| public org. | getObject()
Implements org. Return an instance (possibly shared or independent) of the object managed by this factory. |
| public Class | getObjectType()
Implements org. Return the type of object that this FactoryBean creates,
or |
| public boolean | isSingleton()
Overrides default org. Is the object managed by this factory a singleton? |
| public void | setBeanName(String
the name of the bean in the factory.
Note that this name is the actual bean name used in the factory, which may
differ from the originally specified name: in particular for inner bean
names, the actual bean name might have been made unique through appending
"#..." suffixes. Use the beanName)BeanFactoryUtils#originalBeanName(String)
method to extract the original bean name (without suffix), if desired.Implements org. Set the name of the bean in the bean factory that created this bean. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setJobDataAsMap(Map<String, ?>
a Map with String keys and any objects as values
(for example Spring-managed beans) jobDataAsMap)Register objects in the JobDataMap via a given Map. |
| public void | |
| public void | setJobDetail(org.
Set the JobDetail that this trigger should be associated with. |
| public void | |
| public void | setMisfireInstructionName(String constantName)
Set the misfire instruction for this trigger via the name of the corresponding
constant in the |
| public void | |
| public void | |
| public void | |
| public void | |
| public void |
| beanName | back to summary |
|---|---|
| private String beanName
| |
| calendarName | back to summary |
|---|---|
| private String calendarName
| |
| constants | back to summary |
|---|---|
| private static final Map<String, Integer> constants Map of constant names to constant values for the misfire instruction constants
defined in | |
| cronExpression | back to summary |
|---|---|
| private String cronExpression
| |
| cronTrigger | back to summary |
|---|---|
| private org. | |
| description | back to summary |
|---|---|
| private String description
| |
| group | back to summary |
|---|---|
| private String group
| |
| jobDataMap | back to summary |
|---|---|
| private org. | |
| jobDetail | back to summary |
|---|---|
| private org. | |
| misfireInstruction | back to summary |
|---|---|
| private int misfireInstruction | |
| name | back to summary |
|---|---|
| private String name
| |
| priority | back to summary |
|---|---|
| private int priority | |
| startDelay | back to summary |
|---|---|
| private long startDelay | |
| startTime | back to summary |
|---|---|
| private Date startTime
| |
| timeZone | back to summary |
|---|---|
| private TimeZone timeZone
| |
| CronTriggerFactoryBean | back to summary |
|---|---|
| public CronTriggerFactoryBean() | |
| afterPropertiesSet | back to summary |
|---|---|
| public void afterPropertiesSet() throws ParseException Implements org. Doc from org. Invoked by the containing This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
| |
| getJobDataMap | back to summary |
|---|---|
| public org. Return the trigger's JobDataMap. | |
| getObject | back to summary |
|---|---|
| public org. Implements org. Doc from org. Return an instance (possibly shared or independent) of the object managed by this factory. As with a If this FactoryBean is not fully initialized yet at the time of
the call (for example because it is involved in a circular reference),
throw a corresponding As of Spring 2.0, FactoryBeans are allowed to return | |
| getObjectType | back to summary |
|---|---|
| public Class Implements org. Doc from org. Return the type of object that this FactoryBean creates,
or This allows one to check for specific types of beans without instantiating objects, for example on autowiring. In the case of implementations that are creating a singleton object, this method should try to avoid singleton creation as far as possible; it should rather estimate the type in advance. For prototypes, returning a meaningful type here is advisable too. This method can be called before this FactoryBean has been fully initialized. It must not rely on state created during initialization; of course, it can still use such state if available. Note Autowiring will simply ignore FactoryBeans that return
| |
| isSingleton | back to summary |
|---|---|
| public boolean isSingleton() Overrides default org. Doc from org. Is the object managed by this factory a singleton? That is,
will Note If a FactoryBean indicates to hold a singleton object,
the object returned from The singleton status of the FactoryBean itself will generally be provided by the owning BeanFactory; usually, it has to be defined as singleton there. Note This method returning The default implementation returns
| |
| setBeanName | back to summary |
|---|---|
| public void setBeanName(String beanName) Implements org. Doc from org. Set the name of the bean in the bean factory that created this bean. Invoked after population of normal bean properties but before an
init callback such as
| |
| setCalendarName | back to summary |
|---|---|
| public void setCalendarName(String calendarName) Associate a specific calendar with this cron trigger. | |
| setCronExpression | back to summary |
|---|---|
| public void setCronExpression(String cronExpression) Specify the cron expression for this trigger. | |
| setDescription | back to summary |
|---|---|
| public void setDescription(String description) Associate a textual description with this trigger. | |
| setGroup | back to summary |
|---|---|
| public void setGroup(String group) Specify the trigger's group. | |
| setJobDataAsMap | back to summary |
|---|---|
| public void setJobDataAsMap(Map<String, ?> jobDataAsMap) Register objects in the JobDataMap via a given Map. These objects will be available to this Trigger only, in contrast to objects in the JobDetail's data map. | |
| setJobDataMap | back to summary |
|---|---|
| public void setJobDataMap(org. Set the trigger's JobDataMap.
| |
| setJobDetail | back to summary |
|---|---|
| public void setJobDetail(org. Set the JobDetail that this trigger should be associated with. | |
| setMisfireInstruction | back to summary |
|---|---|
| public void setMisfireInstruction(int misfireInstruction) Specify the misfire instruction for this trigger. | |
| setMisfireInstructionName | back to summary |
|---|---|
| public void setMisfireInstructionName(String constantName) Set the misfire instruction for this trigger via the name of the corresponding
constant in the Default is | |
| setName | back to summary |
|---|---|
| public void setName(String name) Specify the trigger's name. | |
| setPriority | back to summary |
|---|---|
| public void setPriority(int priority) Specify the priority of this trigger. | |
| setStartDelay | back to summary |
|---|---|
| public void setStartDelay(long startDelay) Set the start delay in milliseconds. The start delay is added to the current system time (when the bean starts) to control the start time of the trigger. | |
| setStartTime | back to summary |
|---|---|
| public void setStartTime(Date startTime) Set a specific start time for the trigger. Note that a dynamically computed | |
| setTimeZone | back to summary |
|---|---|
| public void setTimeZone(TimeZone timeZone) Specify the time zone for this trigger's cron expression. | |