Package org.quartz.simpl
Class SimpleJobFactory
- java.lang.Object
-
- org.quartz.simpl.SimpleJobFactory
-
- All Implemented Interfaces:
JobFactory
- Direct Known Subclasses:
PropertySettingJobFactory
public class SimpleJobFactory extends java.lang.Object implements JobFactory
The default JobFactory used by Quartz - simply callsnewInstance()on the job class.- Author:
- jhouse
- See Also:
JobFactory,PropertySettingJobFactory
-
-
Constructor Summary
Constructors Constructor Description SimpleJobFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.slf4j.LoggergetLog()JobnewJob(TriggerFiredBundle bundle, Scheduler scheduler)Called by the scheduler at the time of the trigger firing, in order to produce aJobinstance on which to call execute.
-
-
-
Method Detail
-
getLog
protected org.slf4j.Logger getLog()
-
newJob
public Job newJob(TriggerFiredBundle bundle, Scheduler scheduler) throws SchedulerException
Description copied from interface:JobFactoryCalled by the scheduler at the time of the trigger firing, in order to produce aJobinstance on which to call execute.It should be extremely rare for this method to throw an exception - basically only the case where there is no way at all to instantiate and prepare the Job for execution. When the exception is thrown, the Scheduler will move all triggers associated with the Job into the
Trigger.STATE_ERRORstate, which will require human intervention (e.g. an application restart after fixing whatever configuration problem led to the issue with instantiating the Job.- Specified by:
newJobin interfaceJobFactory- Parameters:
bundle- The TriggerFiredBundle from which theJobDetailand other info relating to the trigger firing can be obtained.scheduler- a handle to the scheduler that is about to execute the job.- Returns:
- the newly instantiated Job
- Throws:
SchedulerException- if there is a problem instantiating the Job.
-
-