org.drools.time.impl
Class IntervalTrigger

java.lang.Object
  extended by org.drools.time.impl.IntervalTrigger
All Implemented Interfaces:
Serializable, Trigger

public class IntervalTrigger
extends Object
implements Trigger

See Also:
Serialized Form

Constructor Summary
IntervalTrigger()
           
IntervalTrigger(long timestamp, Date startTime, Date endTime, int repeatLimit, long delay, long period, String[] calendarNames, org.drools.runtime.Calendars calendars)
           
 
Method Summary
 String[] getCalendarNames()
           
 org.drools.runtime.Calendars getCalendars()
           
 Date getEndTime()
           Get the time at which the CronTrigger should quit repeating - even if repeastCount isn't yet satisfied.
 Date getNextFireTime()
           
 long getPeriod()
           
 int getRepeatCount()
           
 int getRepeatLimit()
           
 Date getStartTime()
           
 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.
 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(ObjectInput in)
           
 void setCalendarNames(String[] calendarNames)
           
 void setCalendars(org.drools.runtime.Calendars calendars)
           
 void setEndTime(Date endTime)
           
 void setFirstFireTime()
           
 void setNextFireTime(Date nextFireTime)
           
 void setPeriod(long period)
           
 void setRepeatCount(int repeatCount)
           
 void setRepeatLimit(int repeatLimit)
           
 void setStartTime(Date startTime)
           
 String toString()
           
 void updateToNextIncludeDate()
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IntervalTrigger

public IntervalTrigger()

IntervalTrigger

public IntervalTrigger(long timestamp,
                       Date startTime,
                       Date endTime,
                       int repeatLimit,
                       long delay,
                       long period,
                       String[] calendarNames,
                       org.drools.runtime.Calendars calendars)
Method Detail

getRepeatLimit

public int getRepeatLimit()

getRepeatCount

public int getRepeatCount()

getNextFireTime

public Date getNextFireTime()

getPeriod

public long getPeriod()

getCalendarNames

public String[] getCalendarNames()

getCalendars

public org.drools.runtime.Calendars getCalendars()

getStartTime

public Date getStartTime()

setStartTime

public void setStartTime(Date startTime)

getEndTime

public Date getEndTime()

Get the time at which the CronTrigger should quit repeating - even if repeastCount isn't yet satisfied.

See Also:
#getFinalFireTime()

setEndTime

public void setEndTime(Date endTime)

setFirstFireTime

public void setFirstFireTime()

hasNextFireTime

public 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 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(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Throws:
IOException

updateToNextIncludeDate

public void updateToNextIncludeDate()

setRepeatLimit

public void setRepeatLimit(int repeatLimit)

setRepeatCount

public void setRepeatCount(int repeatCount)

setNextFireTime

public void setNextFireTime(Date nextFireTime)

setPeriod

public void setPeriod(long period)

setCalendarNames

public void setCalendarNames(String[] calendarNames)

setCalendars

public void setCalendars(org.drools.runtime.Calendars calendars)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.