Class TriggerListenerSupport
- java.lang.Object
-
- org.quartz.listeners.TriggerListenerSupport
-
- All Implemented Interfaces:
TriggerListener
- Direct Known Subclasses:
JobInterruptMonitorPlugin
public abstract class TriggerListenerSupport extends java.lang.Object implements TriggerListener
A helpful abstract base class for implementors of.TriggerListenerThe methods in this class are empty so you only need to override the subset for the
events you care about.TriggerListenerYou are required to implement
to return the unique name of yourTriggerListener.getName()TriggerListener.- See Also:
TriggerListener
-
-
Constructor Summary
Constructors Constructor Description TriggerListenerSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.slf4j.LoggergetLog()Get thefor this class's category.LoggervoidtriggerComplete(Trigger trigger, JobExecutionContext context, Trigger.CompletedExecutionInstruction triggerInstructionCode)voidtriggerFired(Trigger trigger, JobExecutionContext context)voidtriggerMisfired(Trigger trigger)booleanvetoJobExecution(Trigger trigger, JobExecutionContext context)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.quartz.TriggerListener
getName
-
-
-
-
Method Detail
-
getLog
protected org.slf4j.Logger getLog()
Get thefor this class's category. This should be used by subclasses for logging.Logger
-
triggerFired
public void triggerFired(Trigger trigger, JobExecutionContext context)
Description copied from interface:TriggerListenerCalled by the
when aSchedulerhas fired, and it's associatedTriggeris about to be executed.JobDetailIt is called before the
vetoJobExecution(..)method of this interface.- Specified by:
triggerFiredin interfaceTriggerListener- Parameters:
trigger- TheTriggerthat has fired.context- TheJobExecutionContextthat will be passed to theJob'sexecute(xx)method.
-
vetoJobExecution
public boolean vetoJobExecution(Trigger trigger, JobExecutionContext context)
Description copied from interface:TriggerListenerCalled by the
when aSchedulerhas fired, and it's associatedTriggeris about to be executed. If the implementation vetoes the execution (via returningJobDetailtrue), the job's execute method will not be called.It is called after the
triggerFired(..)method of this interface.- Specified by:
vetoJobExecutionin interfaceTriggerListener- Parameters:
trigger- TheTriggerthat has fired.context- TheJobExecutionContextthat will be passed to theJob'sexecute(xx)method.
-
triggerMisfired
public void triggerMisfired(Trigger trigger)
Description copied from interface:TriggerListenerCalled by the
when aSchedulerhas misfired.TriggerConsideration should be given to how much time is spent in this method, as it will affect all triggers that are misfiring. If you have lots of triggers misfiring at once, it could be an issue it this method does a lot.
- Specified by:
triggerMisfiredin interfaceTriggerListener- Parameters:
trigger- TheTriggerthat has misfired.
-
triggerComplete
public void triggerComplete(Trigger trigger, JobExecutionContext context, Trigger.CompletedExecutionInstruction triggerInstructionCode)
Description copied from interface:TriggerListenerCalled by the
when aSchedulerhas fired, it's associatedTriggerhas been executed, and it'sJobDetailtriggered(xx)method has been called.- Specified by:
triggerCompletein interfaceTriggerListener- Parameters:
trigger- TheTriggerthat was fired.context- TheJobExecutionContextthat was passed to theJob'sexecute(xx)method.triggerInstructionCode- the result of the call on theTrigger'striggered(xx)method.
-
-