|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.quartz.Trigger org.quartz.CronTrigger org.springframework.scheduling.quartz.CronTriggerBean
Convenience subclass of Quartz' CronTrigger class that eases bean-style usage.
CronTrigger 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 the default timezone if not specified.
This class will also register the trigger with the job name and group of a given JobDetail. This allows SchedulerFactoryBean to automatically register a trigger for the respective JobDetail, instead of registering the JobDetail separately.
Trigger.setName(java.lang.String)
,
Trigger.setGroup(java.lang.String)
,
CronTrigger.setStartTime(java.util.Date)
,
Trigger.setJobName(java.lang.String)
,
Trigger.setJobGroup(java.lang.String)
,
setJobDetail(org.quartz.JobDetail)
,
SchedulerFactoryBean.setTriggers(org.quartz.Trigger[])
,
SchedulerFactoryBean.setJobDetails(org.quartz.JobDetail[])
,
Serialized FormField Summary |
Fields inherited from class org.quartz.CronTrigger |
MISFIRE_INSTRUCTION_DO_NOTHING, MISFIRE_INSTRUCTION_FIRE_ONCE_NOW |
Fields inherited from class org.quartz.Trigger |
INSTRUCTION_DELETE_TRIGGER, INSTRUCTION_NOOP, INSTRUCTION_RE_EXECUTE_JOB, INSTRUCTION_SET_ALL_JOB_TRIGGERS_COMPLETE, INSTRUCTION_SET_TRIGGER_COMPLETE, MISFIRE_INSTRUCTION_SMART_POLICY, STATE_COMPLETE, STATE_ERROR, STATE_NONE, STATE_NORMAL, STATE_PAUSED |
Constructor Summary | |
CronTriggerBean()
|
Method Summary | |
void |
afterPropertiesSet()
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware). |
org.quartz.JobDetail |
getJobDetail()
Return the JobDetail that this Trigger is associated with. |
void |
setBeanName(java.lang.String beanName)
Set the name of the bean in the bean factory that created this bean. |
void |
setJobDetail(org.quartz.JobDetail jobDetail)
Set the JobDetail that this trigger should be associated with. |
Methods inherited from class org.quartz.CronTrigger |
computeFirstFireTime, executionComplete, getCronExpression, getEndTime, getExpressionSummary, getFinalFireTime, getFireTimeAfter, getLastDayOfMonth, getNextFireTime, getPreviousFireTime, getStartTime, getTimeZone, isLeapYear, main, mayFireAgain, setCronExpression, setEndTime, setNextFireTime, setPreviousFireTime, setStartTime, setTimeZone, triggered, updateAfterMisfire, validateMisfireInstruction, willFireOn |
Methods inherited from class org.quartz.Trigger |
addTriggerListener, clone, compareTo, equals, getCalendarName, getDescription, getFireInstanceId, getFullJobName, getFullName, getGroup, getJobGroup, getJobName, getMisfireInstruction, getName, getTriggerListenerNames, isVolatile, removeTriggerListener, setCalendarName, setDescription, setFireInstanceId, setGroup, setJobGroup, setJobName, setMisfireInstruction, setName, setVolatility, toString, validate |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public CronTriggerBean()
Method Detail |
public void setJobDetail(org.quartz.JobDetail jobDetail)
This is typically used with a bean reference if the JobDetail is a Spring-managed bean. Alternatively, the trigger can also be associated with a job by name and group.
Trigger.setJobName(java.lang.String)
,
Trigger.setJobGroup(java.lang.String)
public org.quartz.JobDetail getJobDetail()
JobDetailAwareTrigger
getJobDetail
in interface JobDetailAwareTrigger
public void setBeanName(java.lang.String beanName)
BeanNameAware
Invoked after population of normal bean properties but before an init callback like InitializingBean's afterPropertiesSet or a custom init-method.
setBeanName
in interface BeanNameAware
beanName
- the name of the bean in the factorypublic void afterPropertiesSet() throws java.text.ParseException
InitializingBean
This method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.
afterPropertiesSet
in interface InitializingBean
java.text.ParseException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |