Package org.quartz.listeners
Interface TriggerListener
public interface TriggerListener
The interface to be implemented by classes that want to be informed when a
Trigger
fires. In general, applications that use a Scheduler
will not have use for
this mechanism.- Author:
- James House
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
Get the name of theTriggerListener
.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)
-
Method Details
-
getName
String getName()Get the name of theTriggerListener
. -
triggerFired
Called by the
when aScheduler
has fired, and it's associatedTrigger
is about to be executed.JobDetail
It is called before the
vetoJobExecution(..)
method of this interface.- Parameters:
trigger
- TheTrigger
that has fired.context
- TheJobExecutionContext
that will be passed to theJob
'sexecute(xx)
method.
-
vetoJobExecution
Called by the
when aScheduler
has fired, and it's associatedTrigger
is about to be executed. If the implementation vetos the execution (via returningJobDetail
true
), the job's execute method will not be called.It is called after the
triggerFired(..)
method of this interface.- Parameters:
trigger
- TheTrigger
that has fired.context
- TheJobExecutionContext
that will be passed to theJob
'sexecute(xx)
method.
-
triggerMisfired
Called by the
when aScheduler
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.
- Parameters:
trigger
- TheTrigger
that has misfired.
-
triggerComplete
void triggerComplete(Trigger trigger, JobExecutionContext context, Trigger.CompletedExecutionInstruction triggerInstructionCode) Called by the
when aScheduler
has fired, it's associatedTrigger
has been executed, and it'sJobDetail
triggered(xx)
method has been called.- Parameters:
trigger
- TheTrigger
that was fired.context
- TheJobExecutionContext
that was passed to theJob
'sexecute(xx)
method.triggerInstructionCode
- the result of the call on theTrigger
'striggered(xx)
method.
-