Package org.drools.core.time.impl
Class CompositeMaxDurationTrigger
- java.lang.Object
-
- org.drools.core.time.impl.CompositeMaxDurationTrigger
-
- All Implemented Interfaces:
java.io.Externalizable,java.io.Serializable,Trigger
public class CompositeMaxDurationTrigger extends java.lang.Object implements Trigger, java.io.Externalizable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CompositeMaxDurationTrigger()CompositeMaxDurationTrigger(java.util.Date maxDurationTimestamp, Trigger timerTrigger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.DategetMaxDurationTimestamp()java.util.DategetTimerCurrentDate()TriggergetTimerTrigger()java.util.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.java.util.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(java.io.ObjectInput in)voidsetMaxDurationTimestamp(java.util.Date maxDurationTimestamp)voidsetTimerCurrentDate(java.util.Date timerCurrentDate)voidsetTimerTrigger(Trigger timerTrigger)voidwriteExternal(java.io.ObjectOutput out)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.drools.core.time.Trigger
initialize
-
-
-
-
Constructor Detail
-
CompositeMaxDurationTrigger
public CompositeMaxDurationTrigger()
-
CompositeMaxDurationTrigger
public CompositeMaxDurationTrigger(java.util.Date maxDurationTimestamp, Trigger timerTrigger)
-
-
Method Detail
-
hasNextFireTime
public java.util.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 java.util.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.
-
getTimerCurrentDate
public java.util.Date getTimerCurrentDate()
-
setTimerCurrentDate
public void setTimerCurrentDate(java.util.Date timerCurrentDate)
-
getTimerTrigger
public Trigger getTimerTrigger()
-
setTimerTrigger
public void setTimerTrigger(Trigger timerTrigger)
-
getMaxDurationTimestamp
public java.util.Date getMaxDurationTimestamp()
-
setMaxDurationTimestamp
public void setMaxDurationTimestamp(java.util.Date maxDurationTimestamp)
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
writeExternalin interfacejava.io.Externalizable- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
readExternalin interfacejava.io.Externalizable- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
-