Save This Page
Home » spring-framework-2.5.6-with-dependencies » org.springframework » scheduling » quartz » [javadoc | source]
org.springframework.scheduling.quartz
public class: SimpleTriggerBean [javadoc | source]
java.lang.Object
   org.quartz.SimpleTrigger
      org.springframework.scheduling.quartz.SimpleTriggerBean

All Implemented Interfaces:
    JobDetailAwareTrigger, BeanNameAware, InitializingBean

Convenience subclass of Quartz's org.quartz.SimpleTrigger class, making bean-style usage easier.

SimpleTrigger 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.quartz.JobDetail . This allows SchedulerFactoryBean to automatically register a trigger for the corresponding JobDetail, instead of registering the JobDetail separately.

NOTE: This convenience subclass does not work with trigger persistence in Quartz 1.6, due to a change in Quartz's trigger handling. Use Quartz 1.5 if you rely on trigger persistence based on this class, or the standard Quartz org.quartz.SimpleTrigger class instead.

Constructor:
 public SimpleTriggerBean() 
Method from org.springframework.scheduling.quartz.SimpleTriggerBean Summary:
afterPropertiesSet,   getJobDetail,   setBeanName,   setJobDataAsMap,   setJobDetail,   setMisfireInstructionName,   setStartDelay,   setTriggerListenerNames
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.scheduling.quartz.SimpleTriggerBean Detail:
 public  void afterPropertiesSet() throws ParseException 
 public JobDetail getJobDetail() 
 public  void setBeanName(String beanName) 
 public  void setJobDataAsMap(Map 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.

 public  void setJobDetail(JobDetail jobDetail) 
    Set the JobDetail that this trigger should be associated with.

    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.

 public  void setMisfireInstructionName(String constantName) 
    Set the misfire instruction via the name of the corresponding constant in the org.quartz.SimpleTrigger class. Default is MISFIRE_INSTRUCTION_SMART_POLICY.
 public  void setStartDelay(long startDelay) 
    Set the delay before starting the job for the first time. The given number of milliseconds will be added to the current time to calculate the start time. Default is 0.

    This delay will just be applied if no custom start time was specified. However, in typical usage within a Spring context, the start time will be the container startup time anyway. Specifying a relative delay is appropriate in that case.

 public  void setTriggerListenerNames(String[] names) 
    Set a list of TriggerListener names for this job, referring to non-global TriggerListeners registered with the Scheduler.

    A TriggerListener name always refers to the name returned by the TriggerListener implementation.