类 AdaptableJobFactory
- java.lang.Object
- org.springframework.scheduling.quartz.AdaptableJobFactory
- 所有已实现的接口:
JobFactory
- 直接已知子类:
SpringBeanJobFactory
public class AdaptableJobFactory extends Object implements JobFactory
JobFactory
implementation that supportsRunnable
objects as well as standard QuartzJob
instances.Compatible with Quartz 2.1.4 and higher, as of Spring 4.1.
- 从以下版本开始:
- 2.0
- 作者:
- Juergen Hoeller
- 另请参阅:
DelegatingJob
,adaptJob(Object)
构造器概要
构造器 构造器 说明 AdaptableJobFactory()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected Job
adaptJob(Object jobObject)
Adapt the given job object to the Quartz Job interface.protected Object
createJobInstance(TriggerFiredBundle bundle)
Create an instance of the specified job class.Job
newJob(TriggerFiredBundle bundle, Scheduler scheduler)
构造器详细资料
AdaptableJobFactory
public AdaptableJobFactory()
方法详细资料
newJob
public Job newJob(TriggerFiredBundle bundle, Scheduler scheduler) throws SchedulerException
- 指定者:
newJob
在接口中JobFactory
- 抛出:
SchedulerException
createJobInstance
protected Object createJobInstance(TriggerFiredBundle bundle) throws Exception
Create an instance of the specified job class.Can be overridden to post-process the job instance.
- 参数:
bundle
- the TriggerFiredBundle from which the JobDetail and other info relating to the trigger firing can be obtained- 返回:
- the job instance
- 抛出:
Exception
- if job instantiation failed
adaptJob
protected Job adaptJob(Object jobObject) throws Exception
Adapt 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.
- 参数:
jobObject
- the original instance of the specified job class- 返回:
- the adapted Quartz Job instance
- 抛出:
Exception
- if the given job could not be adapted- 另请参阅:
DelegatingJob