Class PointInTimeTrigger

  • All Implemented Interfaces:
    java.io.Serializable, Trigger

    public class PointInTimeTrigger
    extends java.lang.Object
    implements Trigger
    See Also:
    Serialized Form
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static PointInTimeTrigger createPointInTimeTrigger​(long timestamp, java.util.Collection<org.kie.api.time.Calendar> calendars)  
      java.util.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.
      java.util.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.
      void readExternal​(java.io.ObjectInput in)  
      java.lang.String toString()  
      void writeExternal​(java.io.ObjectOutput out)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PointInTimeTrigger

        public PointInTimeTrigger()
      • PointInTimeTrigger

        public PointInTimeTrigger​(long timestamp)
    • Method Detail

      • createPointInTimeTrigger

        public static PointInTimeTrigger createPointInTimeTrigger​(long timestamp,
                                                                  java.util.Collection<org.kie.api.time.Calendar> calendars)
      • hasNextFireTime

        public java.util.Date hasNextFireTime()
        Description copied from interface: Trigger
        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.
        Specified by:
        hasNextFireTime in interface Trigger
        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: Trigger
        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.
        Specified by:
        nextFireTime in interface Trigger
        Returns:
        the Date of the next fire time or null if there is no next fire time.
      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object