Save This Page
Home » quartz-1.6.0 » org » quartz » listeners » [javadoc | source]
org.quartz.listeners
public class: JobChainingJobListener [javadoc | source]
java.lang.Object
   org.quartz.listeners.JobListenerSupport
      org.quartz.listeners.JobChainingJobListener

All Implemented Interfaces:
    JobListener

Keeps a collection of mappings of which Job to trigger after the completion of a given job. If this listener is notified of a job completing that has a mapping, then it will then attempt to trigger the follow-up job. This achieves "job chaining", or a "poor man's workflow".

Generally an instance of this listener would be registered as a global job listener, rather than being registered directly to a given job.

If for some reason there is a failure creating the trigger for the follow-up job (which would generally only be caused by a rare serious failure in the system, or the non-existence of the follow-up job), an error messsage is logged, but no other action is taken. If you need more rigorous handling of the error, consider scheduling the triggering of the flow-up job within your job itself.

Constructor:
 public JobChainingJobListener(String name) 
    Construct an instance with the given name.
    Parameters:
    name - the name of this instance
Method from org.quartz.listeners.JobChainingJobListener Summary:
addJobChainLink,   getName,   jobWasExecuted
Methods from org.quartz.listeners.JobListenerSupport:
getLog,   jobExecutionVetoed,   jobToBeExecuted,   jobWasExecuted
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.quartz.listeners.JobChainingJobListener Detail:
 public  void addJobChainLink(Key firstJob,
    Key secondJob) 
    Add a chain mapping - when the Job identified by the first key completes the job identified by the second key will be triggered.
 public String getName() 
 public  void jobWasExecuted(JobExecutionContext context,
    JobExecutionException jobException)