Quartz Scheduler Developer Guide : Working with TriggerListeners and JobListeners : TriggerListeners and JobListeners
TriggerListeners and JobListeners
Listeners are objects that you create to perform actions based on events occurring within the scheduler. As indicated by their names, TriggerListeners receive events related to triggers, and JobListeners receive events related to jobs.
Trigger-related events include: trigger firings, trigger misfirings (discussed in Working with Triggers), and trigger completions (the jobs fired off by the trigger is finished).
The org.quartz.TriggerListener Interface
public interface TriggerListener {
public String getName();
public void triggerFired(Trigger trigger, JobExecutionContext context);
public boolean vetoJobExecution(Trigger trigger, JobExecutionContext context);
public void triggerMisfired(Trigger trigger);
public void triggerComplete(Trigger trigger, JobExecutionContext context,
int triggerInstructionCode);
}
Job-related events include: a notification that the job is about to be executed, and a notification when the job has completed execution.
The org.quartz.JobListener Interface
public interface JobListener {
public String getName();
public void jobToBeExecuted(JobExecutionContext context);
public void jobExecutionVetoed(JobExecutionContext context);
public void jobWasExecuted(JobExecutionContext context,
JobExecutionException jobException);
}
Copyright © 2010-2016 Software AG, Darmstadt, Germany.

Product Logo |   Feedback