public interface ITriggerListener
ITrigger fires. In general, applications that use a
Scheduler will not have use for this mechanism.IListenerManager.addTriggerListener(ITriggerListener, IMatcher),
IMatcher,
ITrigger,
IJobListener,
IJobExecutionContext| Modifier and Type | Method and Description |
|---|---|
String |
getName()
Get the name of the
TriggerListener. |
default void |
triggerComplete(ITrigger trigger,
IJobExecutionContext context,
ITrigger.ECompletedExecutionInstruction triggerInstructionCode)
Called by the
when a
has fired, it's associated
has been executed, and
it's triggered(xx) method has been called. |
default void |
triggerFired(ITrigger trigger,
IJobExecutionContext context)
Called by the
when a
has fired, and it's associated
is about to be executed. |
default void |
triggerMisfired(ITrigger trigger)
Called by the
when a
has misfired. |
default boolean |
vetoJobExecution(ITrigger trigger,
IJobExecutionContext context)
Called by the
when a
has fired, and it's associated
is about to be executed. |
String getName()
TriggerListener.default void triggerFired(ITrigger trigger, IJobExecutionContext context)
Called by the when a
IScheduler has fired, and it's associated
ITrigger is about to be executed.
IJobDetail
It is called before the vetoJobExecution(..) method of this
interface.
trigger - The Trigger that has fired.context - The JobExecutionContext that will be passed to the
Job'sexecute(xx) method.default boolean vetoJobExecution(ITrigger trigger, IJobExecutionContext context)
Called by the when a
IScheduler has fired, and it's associated
ITrigger is about to be executed.
If the implementation vetos the execution (via returning
IJobDetailtrue), the job's execute method will not be called.
It is called after the triggerFired(..) method of this
interface.
trigger - The Trigger that has fired.context - The JobExecutionContext that will be passed to the
Job'sexecute(xx) method.default void triggerMisfired(ITrigger trigger)
Called by the when a
IScheduler has misfired.
ITrigger
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.
trigger - The Trigger that has misfired.default void triggerComplete(ITrigger trigger, IJobExecutionContext context, ITrigger.ECompletedExecutionInstruction triggerInstructionCode)
Called by the when a
IScheduler has fired, it's associated
ITrigger has been executed, and
it's IJobDetailtriggered(xx) method has been called.
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 © 2016–2021 Philip Helger. All rights reserved.