BEAST
|
The manager keeping track on all timeouts. More...
Public Member Functions | |
TimeoutManager () | |
Default constructor. | |
void | setTimer (Timer timer) |
Sets the timer instance. | |
void | setFactory (ITimeoutTaskFactory factory) |
The factory for creating TimeoutTasks. | |
void | setMessageManager (IBltMessageManager messageManager) |
synchronized boolean | isRegistered (Object data) |
Checks if any task contains a data object equal to the provided data object. | |
synchronized TimeoutTask | getRegisteredTask (Object data) |
Returns the task matching the provided data if any. | |
synchronized long | register (ITimeoutRule rule, long delay, Object data) |
Registers a timeout that should be triggered after delay (ms). | |
synchronized void | cancel (long id) |
Cancels the timeout with the specified id. | |
synchronized void | unregister (long id) |
Unregisters the task with the specified id. | |
void | cancelNotification (long id, ITimeoutRule rule, Object data) |
void | timeoutNotification (long id, ITimeoutRule rule, Object data) |
void | destroy () throws Exception |
Protected Member Functions | |
synchronized void | setStartID (long v) |
Sets the start value for the id-sequence. | |
synchronized long | newID () |
Returns a new unique id for each call. | |
Protected Attributes | |
Map< Long, TimeoutTask > | tasks = null |
The registered tasks. | |
The manager keeping track on all timeouts.
|
inline |
Default constructor.
|
inline |
Cancels the timeout with the specified id.
id | the id |
|
inline |
Implements eu.baltrad.beast.rules.timer.ITimeoutTaskListener.
|
inline |
|
inline |
Returns the task matching the provided data if any.
data | the data object to match against |
|
inline |
Checks if any task contains a data object equal to the provided data object.
data | the data object |
|
inlineprotected |
Returns a new unique id for each call.
|
inline |
Registers a timeout that should be triggered after delay (ms).
rule | the rule to be called |
delay | the delay in miliseconds |
data | data to be passed on to the one registering the task |
|
inline |
The factory for creating TimeoutTasks.
factory | the factory |
|
inline |
messageManager | the message manager to set |
|
inlineprotected |
Sets the start value for the id-sequence.
v |
|
inline |
Sets the timer instance.
timer | the timer |
|
inline |
Implements eu.baltrad.beast.rules.timer.ITimeoutTaskListener.
|
inline |
Unregisters the task with the specified id.
id | the id |
|
protected |
The registered tasks.