Package org.drools.core.time.impl
Class PointInTimeTrigger
- java.lang.Object
-
- org.drools.core.time.impl.PointInTimeTrigger
-
- All Implemented Interfaces:
Serializable,Trigger
public class PointInTimeTrigger extends Object implements Trigger
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PointInTimeTrigger()PointInTimeTrigger(long timestamp)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PointInTimeTriggercreatePointInTimeTrigger(long timestamp, Collection<org.kie.api.time.Calendar> calendars)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.DatenextFireTime()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.voidreadExternal(ObjectInput in)StringtoString()voidwriteExternal(ObjectOutput out)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.drools.core.time.Trigger
initialize
-
-
-
-
Method Detail
-
createPointInTimeTrigger
public static PointInTimeTrigger createPointInTimeTrigger(long timestamp, Collection<org.kie.api.time.Calendar> calendars)
-
hasNextFireTime
public Date hasNextFireTime()
Description copied from interface:TriggerThis 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.- Specified by:
hasNextFireTimein interfaceTrigger- Returns:
- the Date of the next fire time or null if there is no next fire time.
-
nextFireTime
public Date nextFireTime()
Description copied from interface:TriggerThis 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.- Specified by:
nextFireTimein interfaceTrigger- Returns:
- the Date of the next fire time or null if there is no next fire time.
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Throws:
IOExceptionClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Throws:
IOException
-
-