public abstract class TriggerListenerSupport extends Object implements TriggerListener
TriggerListener
.
The methods in this class are empty so you only need to override the
subset for the
events
you care about.
TriggerListener
You are required to implement
to return the unique name of your TriggerListener.getName()
TriggerListener
.
TriggerListener
Constructor and Description |
---|
TriggerListenerSupport() |
Modifier and Type | Method and Description |
---|---|
protected org.slf4j.Logger |
getLog()
Get the
for this
class's category. |
void |
triggerComplete(Trigger trigger,
JobExecutionContext context,
Trigger.CompletedExecutionInstruction triggerInstructionCode)
|
void |
triggerFired(Trigger trigger,
JobExecutionContext context)
|
void |
triggerMisfired(Trigger trigger)
|
boolean |
vetoJobExecution(Trigger trigger,
JobExecutionContext context)
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName
protected org.slf4j.Logger getLog()
Logger
for this
class's category. This should be used by subclasses for logging.public void triggerFired(Trigger trigger, JobExecutionContext context)
TriggerListener
Called by the
when a Scheduler
has fired, and it's associated Trigger
is about to be executed.
JobDetail
It is called before the vetoJobExecution(..)
method of this
interface.
triggerFired
in interface TriggerListener
trigger
- The Trigger
that has fired.context
- The JobExecutionContext
that will be passed to
the Job
'sexecute(xx)
method.public boolean vetoJobExecution(Trigger trigger, JobExecutionContext context)
TriggerListener
Called by the
when a Scheduler
has fired, and it's associated Trigger
is about to be executed. If the implementation vetos the execution (via
returning JobDetail
true
), the job's execute method will not be called.
It is called after the triggerFired(..)
method of this
interface.
vetoJobExecution
in interface TriggerListener
trigger
- The Trigger
that has fired.context
- The JobExecutionContext
that will be passed to
the Job
'sexecute(xx)
method.public void triggerMisfired(Trigger trigger)
TriggerListener
Called by the
when a Scheduler
has misfired.
Trigger
Consideration 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.
triggerMisfired
in interface TriggerListener
trigger
- The Trigger
that has misfired.public void triggerComplete(Trigger trigger, JobExecutionContext context, Trigger.CompletedExecutionInstruction triggerInstructionCode)
TriggerListener
Called by the
when a Scheduler
has fired, it's associated Trigger
has been executed, and it's JobDetail
triggered(xx)
method has been
called.
triggerComplete
in interface TriggerListener
trigger
- The Trigger
that was fired.context
- The JobExecutionContext
that was passed to the
Job
'sexecute(xx)
method.triggerInstructionCode
- the result of the call on the Trigger
'striggered(xx)
method.Copyright 2001-2019, Terracotta, Inc.