com.caucho.config.types
Class CronType

java.lang.Object
  extended by com.caucho.config.types.CronType
All Implemented Interfaces:
Trigger

public class CronType
extends java.lang.Object
implements Trigger

Implements a unix cron-style trigger.


Constructor Summary
CronType()
           
CronType(java.lang.String cron)
           
CronType(java.lang.String second, java.lang.String minute, java.lang.String hour, java.lang.String dayOfWeek, java.lang.String dayOfMonth, java.lang.String month, java.lang.String year, java.util.Date start, java.util.Date end)
          Creates new cron trigger.
 
Method Summary
 void addText(java.lang.String text)
          Sets the text.
 int nextInterval(boolean[] values, int now)
           
 long nextTime(long now)
          Returns the time of the next trigger event
 int prevInterval(boolean[] values, int now)
           
 long prevTime(long now)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CronType

public CronType()

CronType

public CronType(java.lang.String cron)

CronType

public CronType(java.lang.String second,
                java.lang.String minute,
                java.lang.String hour,
                java.lang.String dayOfWeek,
                java.lang.String dayOfMonth,
                java.lang.String month,
                java.lang.String year,
                java.util.Date start,
                java.util.Date end)
Creates new cron trigger.

Parameters:
second - Second expression.
minute - Minute expression.
hour - Hour expression.
dayOfWeek - Day of week expression.
dayOfMonth - Day of month expression.
month - Month expression.
year - Year expression.
start - Schedule start date.
end - Schedule end date.
Method Detail

addText

public void addText(java.lang.String text)
             throws ConfigException
Sets the text.

Throws:
ConfigException

nextTime

public long nextTime(long now)
Description copied from interface: Trigger
Returns the time of the next trigger event

Specified by:
nextTime in interface Trigger
Parameters:
now - the current time
Returns:
the next trigger time

nextInterval

public int nextInterval(boolean[] values,
                        int now)

prevTime

public long prevTime(long now)

prevInterval

public int prevInterval(boolean[] values,
                        int now)

toString

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