Home » quartz-1.6.0 » org » quartz » spi » [javadoc | source]
org.quartz.spi
public interface: JobFactory [javadoc | source]

All Known Implementing Classes:
    SimpleJobFactory, PropertySettingJobFactory

A JobFactory is responsible for producing instances of Job classes.

This interface may be of use to those wishing to have their application produce Job instances via some special mechanism, such as to give the opertunity for dependency injection.

Method from org.quartz.spi.JobFactory Summary:
newJob
Method from org.quartz.spi.JobFactory Detail:
 public Job newJob(TriggerFiredBundle bundle) throws SchedulerException
    Called by the scheduler at the time of the trigger firing, in order to produce a Job instance 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.