Class SchedulerAccessor
- All Implemented Interfaces:
- Aware,- ResourceLoaderAware
- Direct Known Subclasses:
- SchedulerAccessorBean,- SchedulerFactoryBean
Scheduler instance.
 For concrete usage, check out the SchedulerFactoryBean and
 SchedulerAccessorBean classes.
 
Compatible with Quartz 2.1.4 and higher, as of Spring 4.1.
- Since:
- 2.5.6
- Author:
- Juergen Hoeller, Stephane Nicoll
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected abstract SchedulerTemplate method that determines the Scheduler to operate on.protected voidRegister jobs and triggers (within a transaction, if possible).protected voidRegister all specified listeners with the Scheduler.voidsetCalendars(Map<String, Calendar> calendars) Register a list of Quartz Calendar objects with the Scheduler that this FactoryBean creates, to be referenced by Triggers.voidsetGlobalJobListeners(JobListener... globalJobListeners) Specify global Quartz JobListeners to be registered with the Scheduler.voidsetGlobalTriggerListeners(TriggerListener... globalTriggerListeners) Specify global Quartz TriggerListeners to be registered with the Scheduler.voidsetJobDetails(JobDetail... jobDetails) Register a list of JobDetail objects with the Scheduler that this FactoryBean creates, to be referenced by Triggers.voidsetJobSchedulingDataLocation(String jobSchedulingDataLocation) Set the location of a Quartz job definition XML file that follows the "job_scheduling_data_1_5" XSD or better.voidsetJobSchedulingDataLocations(String... jobSchedulingDataLocations) Set the locations of Quartz job definition XML files that follow the "job_scheduling_data_1_5" XSD or better.voidsetOverwriteExistingJobs(boolean overwriteExistingJobs) Set whether any jobs defined on this SchedulerFactoryBean should overwrite existing job definitions.voidsetResourceLoader(ResourceLoader resourceLoader) Set the ResourceLoader that this object runs in.voidsetSchedulerListeners(SchedulerListener... schedulerListeners) Specify Quartz SchedulerListeners to be registered with the Scheduler.voidsetTransactionManager(PlatformTransactionManager transactionManager) Set the transaction manager to be used for registering jobs and triggers that are defined by this SchedulerFactoryBean.voidsetTriggers(Trigger... triggers) Register a list of Trigger objects with the Scheduler that this FactoryBean creates.
- 
Field Details- 
logger
- 
resourceLoader
 
- 
- 
Constructor Details- 
SchedulerAccessorpublic SchedulerAccessor()
 
- 
- 
Method Details- 
setOverwriteExistingJobspublic void setOverwriteExistingJobs(boolean overwriteExistingJobs) Set whether any jobs defined on this SchedulerFactoryBean should overwrite existing job definitions. Default is "false", to not overwrite already registered jobs that have been read in from a persistent job store.
- 
setJobSchedulingDataLocationSet the location of a Quartz job definition XML file that follows the "job_scheduling_data_1_5" XSD or better. Can be specified to automatically register jobs that are defined in such a file, possibly in addition to jobs defined directly on this SchedulerFactoryBean.- See Also:
 
- 
setJobSchedulingDataLocationsSet the locations of Quartz job definition XML files that follow the "job_scheduling_data_1_5" XSD or better. Can be specified to automatically register jobs that are defined in such files, possibly in addition to jobs defined directly on this SchedulerFactoryBean.- See Also:
 
- 
setJobDetailsRegister a list of JobDetail objects with the Scheduler that this FactoryBean creates, to be referenced by Triggers.This is not necessary when a Trigger determines the JobDetail itself: In this case, the JobDetail will be implicitly registered in combination with the Trigger. - See Also:
 
- 
setCalendarsRegister a list of Quartz Calendar objects with the Scheduler that this FactoryBean creates, to be referenced by Triggers.- Parameters:
- calendars- a Map with calendar names as keys as Calendar objects as values
- See Also:
 
- 
setTriggersRegister a list of Trigger objects with the Scheduler that this FactoryBean creates.If the Trigger determines the corresponding JobDetail itself, the job will be automatically registered with the Scheduler. Else, the respective JobDetail needs to be registered via the "jobDetails" property of this FactoryBean. 
- 
setSchedulerListenersSpecify Quartz SchedulerListeners to be registered with the Scheduler.
- 
setGlobalJobListenersSpecify global Quartz JobListeners to be registered with the Scheduler. Such JobListeners will apply to all Jobs in the Scheduler.
- 
setGlobalTriggerListenersSpecify global Quartz TriggerListeners to be registered with the Scheduler. Such TriggerListeners will apply to all Triggers in the Scheduler.
- 
setTransactionManagerSet the transaction manager to be used for registering jobs and triggers that are defined by this SchedulerFactoryBean. Default is none; setting this only makes sense when specifying a DataSource for the Scheduler.
- 
setResourceLoaderDescription copied from interface:ResourceLoaderAwareSet the ResourceLoader that this object runs in.This might be a ResourcePatternResolver, which can be checked through instanceof ResourcePatternResolver. See also theResourcePatternUtils.getResourcePatternResolvermethod.Invoked after population of normal bean properties but before an init callback like InitializingBean's afterPropertiesSetor a custom init-method. Invoked before ApplicationContextAware'ssetApplicationContext.- Specified by:
- setResourceLoaderin interface- ResourceLoaderAware
- Parameters:
- resourceLoader- the ResourceLoader object to be used by this object
- See Also:
 
- 
registerJobsAndTriggersRegister jobs and triggers (within a transaction, if possible).- Throws:
- SchedulerException
 
- 
registerListenersRegister all specified listeners with the Scheduler.- Throws:
- SchedulerException
 
- 
getSchedulerTemplate method that determines the Scheduler to operate on. To be implemented by subclasses.
 
-