public class SimpleJobFactory extends Object implements JobFactory
newInstance()on the job class.
|Constructor and Description|
|Modifier and Type||Method and Description|
Called by the scheduler at the time of the trigger firing, in order to produce a
protected org.slf4j.Logger getLog()
public Job newJob(TriggerFiredBundle bundle, Scheduler Scheduler) throws SchedulerException
Jobinstance on which to call execute.
It should be extremely rare for this method to throw an exception -
basically only the 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_ERROR state, which will require human
intervention (e.g. an application restart after fixing whatever
configuration problem led to the issue wih instantiating the Job.
bundle- The TriggerFiredBundle from which the
JobDetailand other info relating to the trigger firing can be obtained.
Scheduler- a handle to the scheduler that is about to execute the job.
SchedulerException- if there is a problem instantiating the Job.
Copyright 2001-2017, Terracotta, Inc.