org.springframework.scheduling.quartz
Interface JobDetailAwareTrigger

All Known Implementing Classes:
CronTriggerBean, SimpleTriggerBean

public interface JobDetailAwareTrigger

Interface to be implemented by Quartz Triggers that are aware of the JobDetail object that they are associated with.

SchedulerFactoryBean will auto-detect Triggers that implement this interface and register them for the respective JobDetail accordingly.

The alternative is to configure a Trigger for a Job name and group: This involves the need to register the JobDetail object separately with SchedulerFactoryBean.

NOTE: As of Quartz 2.0, the recommended strategy is to define an entry of name "jobDetail" and type JobDetail in the trigger's JobDataMap.

Since:
18.02.2004
Author:
Juergen Hoeller
See Also:
SchedulerAccessor.setTriggers(org.quartz.Trigger[]), SchedulerAccessor.setJobDetails(org.quartz.JobDetail[]), Trigger.setJobName(java.lang.String), Trigger.setJobGroup(java.lang.String)

Field Summary
static String JOB_DETAIL_KEY
          Name of the key for the JobDetail value in the trigger's JobDataMap.
 
Method Summary
 JobDetail getJobDetail()
          Return the JobDetail that this Trigger is associated with.
 

Field Detail

JOB_DETAIL_KEY

static final String JOB_DETAIL_KEY
Name of the key for the JobDetail value in the trigger's JobDataMap. This is an alternative to implementing the JobDetailAwareTrigger interface.

See Also:
Constant Field Values
Method Detail

getJobDetail

JobDetail getJobDetail()
Return the JobDetail that this Trigger is associated with.

Returns:
the associated JobDetail, or null if none