|
Agent System POND 1.2 (28.2.2002) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--FIM.Util.Threads.Timer
A timer, which can be set for recurring or once calling a number of listeners. The timer can be serialized and will be created exactly as it was serialized, including a new Thread for waiting if the serialized version was running (elapsed time is reset although).
TimerAction
, Serialized FormConstructor Summary | |
Timer(long secondsToWait)
Create a new timer for a certain period which occurs once. |
|
Timer(long secondsToWait,
boolean recurring)
Create a new timer for a certain period, which might be recurring. |
Method Summary | |
void |
addTickListener(TimerAction ta)
Adds a new listener for this timer. |
long |
getID()
Returns the ID of this timer. |
long |
getInterval()
Returns the interval of the timer (Complete time, not the remaining one!). |
void |
removeTickListener(TimerAction ta)
emoves a listener for this timer. |
void |
setInterval(long newInterval)
Sets the interval of the timer. |
void |
startTimer()
Starts the timer. |
void |
stopTimer()
Stops the timer. |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public Timer(long secondsToWait, boolean recurring)
secondsToWait
- number of seconds till (or between) the eventrecurring
- if true
the timer will be restarted
automatically after notifying all listenerspublic Timer(long secondsToWait)
secondsToWait
- number of seconds till (or between) the eventMethod Detail |
public long getID()
public void startTimer()
public void stopTimer()
public long getInterval()
public void setInterval(long newInterval)
public void addTickListener(TimerAction ta)
ta
- the listener to addpublic void removeTickListener(TimerAction ta)
ta
- the listener to remove
|
Agent System POND 1.2 (28.2.2002) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |