public class ScheduleEvent extends Object implements Serializable
Scheduler
.
The base class implements a one shot scheduling.
This is true as long as the Scheduler
is active at (about)
the scheduling date and time. If it was down at that time, the outdated
event is triggered only if its outdatedRestart
field is true.
This class is also used by the Scheduler
to keep the
request until it is complete.
Scheduler
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected Date |
date
event scheduling date
|
protected String |
name
event name
|
protected boolean |
outdatedRestart
execute outdated event on restart
|
private static long |
serialVersionUID
define serialVersionUID for interoperability
|
Constructor and Description |
---|
ScheduleEvent(String name,
Date date)
Creates an item with a default value for
outdatedRestart . |
ScheduleEvent(String name,
Date date,
boolean outdatedRestart)
Creates an item.
|
Modifier and Type | Method and Description |
---|---|
protected Date |
nextDate(Date now)
Returns the next scheduling date after current date given as parameter.
|
String |
toString()
Provides a string image for this object.
|
StringBuffer |
toString(StringBuffer output)
Provides a string image for this object.
|
private static final long serialVersionUID
protected String name
protected Date date
protected boolean outdatedRestart
public ScheduleEvent(String name, Date date, boolean outdatedRestart)
name
- event namedate
- event scheduling dateoutdatedRestart
- execute outdated event on restartpublic StringBuffer toString(StringBuffer output)
public String toString()
protected Date nextDate(Date now)
null
date leads to the scheduler deleting the event.
This function should be overloaded in derived classes to actually implement recurrent scheduling.
now
- current dateCopyright © 2018 ScalAgent D.T.. All Rights Reserved.