Class AdaptableJobFactory
java.lang.Object
org.springframework.scheduling.quartz.AdaptableJobFactory
- All Implemented Interfaces:
- JobFactory
- Direct Known Subclasses:
- SpringBeanJobFactory
JobFactory implementation that supports Runnable
 objects as well as standard Quartz Job instances.
 Compatible with Quartz 2.1.4 and higher, as of Spring 4.1.
- Since:
- 2.0
- Author:
- Juergen Hoeller
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected JobAdapt the given job object to the Quartz Job interface.protected ObjectcreateJobInstance(TriggerFiredBundle bundle) Create an instance of the specified job class.newJob(TriggerFiredBundle bundle, Scheduler scheduler) 
- 
Constructor Details- 
AdaptableJobFactorypublic AdaptableJobFactory()
 
- 
- 
Method Details- 
newJob- Specified by:
- newJobin interface- JobFactory
- Throws:
- SchedulerException
 
- 
createJobInstanceCreate an instance of the specified job class.Can be overridden to post-process the job instance. - Parameters:
- bundle- the TriggerFiredBundle from which the JobDetail and other info relating to the trigger firing can be obtained
- Returns:
- the job instance
- Throws:
- Exception- if job instantiation failed
 
- 
adaptJobAdapt the given job object to the Quartz Job interface.The default implementation supports straight Quartz Jobs as well as Runnables, which get wrapped in a DelegatingJob. - Parameters:
- jobObject- the original instance of the specified job class
- Returns:
- the adapted Quartz Job instance
- Throws:
- Exception- if the given job could not be adapted
- See Also:
 
 
-