com.caucho.config.timer
Class CronTrigger

java.lang.Object
  extended by com.caucho.config.timer.CronTrigger
All Implemented Interfaces:
Trigger

public class CronTrigger
extends java.lang.Object
implements Trigger

Implements a cron-style trigger. This trigger is primarily intended for the EJB calendar style timer service functionality.


Constructor Summary
CronTrigger(CronExpression cronExpression, long start, long end, java.util.TimeZone timezone)
          Creates new cron trigger.
 
Method Summary
 long nextTime(long now)
          Gets the next time this trigger should be fired.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CronTrigger

public CronTrigger(CronExpression cronExpression,
                   long start,
                   long end,
                   java.util.TimeZone timezone)
Creates new cron trigger.

Parameters:
cronExpression - The cron expression to create the trigger from.
start - The date the trigger should begin firing, in milliseconds. -1 indicates that no start date should be enforced.
end - The date the trigger should end firing, in milliseconds. -1 indicates that no end date should be enforced.
string -
Method Detail

nextTime

public long nextTime(long now)
Gets the next time this trigger should be fired.

Specified by:
nextTime in interface Trigger
Parameters:
now - The current time.
Returns:
The next time this trigger should be fired.