Package org.drools.core.time
Interface Trigger
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
CompositeMaxDurationTrigger,CronTrigger,IntervalTrigger,PointInTimeTrigger
public interface Trigger extends Serializable
A trigger interface for scheduling jobs
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description DatehasNextFireTime()This method is used to query the trigger about the existence of a possible next fire time, but WITHOUT changing any internal state of the trigger.default voidinitialize(ReteEvaluator reteEvaluator)this method will be called before any job being called to provide some context to triggerDatenextFireTime()This method returns the date of the next fire time and updates the internal state of the Trigger to the following fire time if one exists.
-
-
-
Method Detail
-
initialize
default void initialize(ReteEvaluator reteEvaluator)
this method will be called before any job being called to provide some context to trigger- Parameters:
reteEvaluator-
-
hasNextFireTime
Date hasNextFireTime()
This method is used to query the trigger about the existence of a possible next fire time, but WITHOUT changing any internal state of the trigger. In other words, this method MUST not have side effects. As an analogy, if a trigger was a stack, this method would be the equivalent of a "peek()" call.- Returns:
- the Date of the next fire time or null if there is no next fire time.
-
nextFireTime
Date nextFireTime()
This method returns the date of the next fire time and updates the internal state of the Trigger to the following fire time if one exists. As an analogy, if a trigger was a stack, this method would be the equivalent of a "pop()" call.- Returns:
- the Date of the next fire time or null if there is no next fire time.
-
-