|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EventManager
The EventManager manages Event
objects.
registerEvent(org.exolab.jms.events.Event, long)
or as relative time
through registerEventRelative(org.exolab.jms.events.Event, long)
. An event must have an associated
event type and may have an attached Serializable
object, which
is used when the EventManager makes a callback to the registered handler when
the event fires.
The register methids will return an event identifier which can subsequently
be used to unregister the event through the unregisterEvent(java.lang.String)
event.
This is the only means of unregister an event.
If the Event
object is incorrectly specified then the IllegalEventDefinedException
exception is raised.
When an event fires the EventManager is responsible for ensuring that the
event handler is notified. If the event handler has since been removed then
the EventManager must gracefully abort the delivery and continue processing
the next event.
This class is also Serviceable
, which implies that it can be
added and controlled by a ServiceManager
.
Method Summary | |
---|---|
java.lang.String |
registerEvent(Event event,
long absolute)
Register an event to be fired once and only once at the specified abolsute time. |
java.lang.String |
registerEventRelative(Event event,
long relative)
Register an event to be fired once and only once at a time relative to now. |
void |
unregisterEvent(java.lang.String id)
Unregister the event specified by the event identifier. |
Method Detail |
---|
java.lang.String registerEvent(Event event, long absolute) throws IllegalEventDefinedException
event
- information about the eventabsolute
- the absolute time, in ms, that the event must fire
IllegalEventDefinedException
java.lang.String registerEventRelative(Event event, long relative) throws IllegalEventDefinedException
event
- information about the eventrelative
- the relative time in ms (currently no reference to
locale).
IllegalEventDefinedException
void unregisterEvent(java.lang.String id)
id
- unique event identifier.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |