|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--amber.type.server.ScheduledObject
This object contains information on the objects which the server is currently scheduling. It contains the reference to the class which is being run along with the timer thread which is invoking it.
amber.server.manager.extension.SchedulerModule| Field Summary | |
protected boolean |
active
Is the object currently active. |
protected amber.type.server.ScheduleInterface |
client
This is the client class which is being scheduled. |
protected long |
duration
The number of milliseconds this client should run. |
protected amber.type.server.SchedulerModule |
parent
The parent controller for this object. |
protected long |
quanta
The repeat interval. |
protected long |
repeatNumber
The number of times the client should be run in total. |
protected boolean |
runFlag
Has the object ever run. |
protected java.util.Date |
startDate
This is the date/time at which point the scheduled object will start.timer thread which is running the client object. |
protected long |
startTime
The time the object was created. |
protected Timer |
timer
This is the timer thread which is running the client object. |
| Constructor Summary | |
ScheduledObject()
Default Constructor. |
|
ScheduledObject(amber.type.server.SchedulerModule parent,
amber.type.server.ScheduleInterface client,
java.util.Date startDate,
long quanta,
long duration,
long repeatNumber)
Initialising Constructor. |
|
| Method Summary | |
amber.type.server.ScheduleInterface |
getClient()
Gets the data in the following variable: This is the client class which is being scheduled. |
long |
getDuration()
Gets the data in the following variable: The number of milliseconds this client should run. |
amber.type.server.SchedulerModule |
getParent()
Gets the data in the following variable: SchedulerModule which handles this object. |
long |
getQuanta()
Gets the data in the following variable: The number of milliseconds before the timer operation should be repeated. |
long |
getRepeatNumber()
Gets the data in the following variable: The number of times the client should be run in total. |
java.util.Date |
getStartDate()
Gets the data in the following variable: This is the date/time at which point the scheduled object will start.timer thread which is running the client object. |
java.util.Date |
getTimeObjectStarted()
Gets the data in the following variable: This is the date/time when the scheduled object was formally started. |
Timer |
getTimer()
Gets the data in the following variable: This is the timer thread which is running the client object. |
boolean |
hasRun()
Gets the data in the following variable: Whether this object has ever run. |
protected void |
initialiseTimer()
|
boolean |
isActive()
Gets the data in the following variable: Whether this object is currently running. |
void |
setActive(boolean data)
Sets the data in the following variable: Whether this object is currently running. |
void |
setClient(amber.type.server.ScheduleInterface data)
Sets the data in the following variable: This is the client class which is being scheduled. |
void |
setDuration(long data)
Sets the data in the following variable: The number of milliseconds this client should run. |
void |
setParent(amber.type.server.SchedulerModule data)
Sets the data in the following variable: SchedulerModule which handles this object. |
void |
setQuanta(long data)
Sets the data in the following variable: The number of milliseconds before the timer operation should be repeated. |
void |
setRepeatNumber(long data)
Sets the data in the following variable: The number of times the client should be run in total. |
void |
setStartDate(java.util.Date data)
Sets the data in the following variable: This is the date/time at which point the scheduled object will start.timer thread which is running the client object. |
void |
setTimer(Timer data)
Sets the data in the following variable: This is the timer thread which is running the client object. |
void |
start()
This function starts the scheduled object internal timer. |
void |
timeEventOccurred()
This is called by the master timer. |
java.lang.String |
toString()
This function returns the String form of the data. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected amber.type.server.ScheduleInterface client
protected Timer timer
protected long quanta
protected long duration
protected long repeatNumber
protected long startTime
protected amber.type.server.SchedulerModule parent
protected boolean active
protected boolean runFlag
protected java.util.Date startDate
| Constructor Detail |
public ScheduledObject()
public ScheduledObject(amber.type.server.SchedulerModule parent,
amber.type.server.ScheduleInterface client,
java.util.Date startDate,
long quanta,
long duration,
long repeatNumber)
parent - SchedulerModule which handles this object.client - This is the client class which is being scheduled.startDate - This is the date/time when the object is to be started.quanta - long time duration to wait before calling the client.duration - The number of milliseconds this client should run.repeatNumber - The number of times the client should be run in total.| Method Detail |
public void start()
protected void initialiseTimer()
public amber.type.server.SchedulerModule getParent()
public amber.type.server.ScheduleInterface getClient()
public Timer getTimer()
public long getQuanta()
public long getDuration()
public long getRepeatNumber()
public boolean hasRun()
public boolean isActive()
public java.util.Date getStartDate()
public java.util.Date getTimeObjectStarted()
public void setParent(amber.type.server.SchedulerModule data)
data - SchedulerModule containing the data to set the variable to.public void setClient(amber.type.server.ScheduleInterface data)
data - ScheduleInterface containing the data to set the variable to.public void setTimer(Timer data)
data - amber.utility.Timer containing the data to set the variable to.public void setQuanta(long data)
data - long containing the data to set the variable to.public void setDuration(long data)
data - long containing the data to set the variable to.public void setRepeatNumber(long data)
data - long containing the data to set the variable to.public void setActive(boolean data)
data - boolean containing the data to set the variable to.public void setStartDate(java.util.Date data)
data - Date containing the data to set the variable to.public java.lang.String toString()
toString in class java.lang.Objectpublic void timeEventOccurred()
timeEventOccurred in interface TimerInterface
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||