Package com.scalagent.scheduler
Class ScheduleEvent
- java.lang.Object
-
- com.scalagent.scheduler.ScheduleEvent
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CronEvent
public class ScheduleEvent extends Object implements Serializable
Base class for event requesting a scheduling to aScheduler.The base class implements a one shot scheduling. This is true as long as the
Scheduleris active at (about) the scheduling date and time. If it was down at that time, the outdated event is triggered only if itsoutdatedRestartfield is true.This class is also used by the
Schedulerto keep the request until it is complete.- See Also:
Scheduler, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Datedateevent scheduling dateprotected Stringnameevent nameprotected booleanoutdatedRestartexecute outdated event on restartprivate static longserialVersionUIDdefine serialVersionUID for interoperability
-
Constructor Summary
Constructors Constructor Description ScheduleEvent(String name, Date date)Creates an item with a default value foroutdatedRestart.ScheduleEvent(String name, Date date, boolean outdatedRestart)Creates an item.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DatenextDate(Date now)Returns the next scheduling date after current date given as parameter.StringtoString()Provides a string image for this object.StringBuffertoString(StringBuffer output)Provides a string image for this object.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
define serialVersionUID for interoperability- See Also:
- Constant Field Values
-
name
protected String name
event name
-
date
protected Date date
event scheduling date
-
outdatedRestart
protected boolean outdatedRestart
execute outdated event on restart
-
-
Method Detail
-
toString
public StringBuffer toString(StringBuffer output)
Provides a string image for this object.- Returns:
- a string image for this object
-
toString
public String toString()
Provides a string image for this object.
-
nextDate
protected Date nextDate(Date now)
Returns the next scheduling date after current date given as parameter. The new date must be strictly greater than the current date. Anulldate leads to the scheduler deleting the event.This function should be overloaded in derived classes to actually implement recurrent scheduling.
- Parameters:
now- current date- Returns:
- next scheduling date after now
-
-