|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EventManager
This component manages the event handling mechanism in the portal.
The event mechanism is based on the publisher/subscriber principle.
An interested component (a Receiver
can subscribe itself for a specific class (or classes) of events.
All Events have a common ancestor type Event
and the event types are
identified by a (sub)class
The old design which is now deprecated has been inspired by the paper by
Gupta, S., J. M. Hartkopf, and S. Ramaswamy, in Java Report, Vol. 3, No. 7, July 1998, 19-36,
"Event Notifier: A Pattern for Event Notification".
EventManager brokers events between a Publisher, which produces events,
and a Subscriber, which handles the notification of events.
A Filter discards events not of interest to a subscriber.
Field Summary | |
---|---|
static String |
ROLE
Represents the role of the service |
Method Summary | |
---|---|
Publisher |
getPublisher()
Deprecated. Use send(Event) instead. |
Register |
getRegister()
Deprecated. Use subscribe(Receiver) and unsubscribe(Receiver) . |
void |
processEvents()
Process the events |
void |
send(Event event)
Publish an event. |
void |
subscribe(Receiver receiver)
Subscribes a receiver for a specific type of event. |
void |
unsubscribe(Receiver receiver)
Unsubscribes a receiver for all events. |
Field Detail |
---|
static final String ROLE
Method Detail |
---|
Publisher getPublisher()
send(Event)
instead.
Register getRegister()
subscribe(Receiver)
and unsubscribe(Receiver)
.
void processEvents() throws ProcessingException
ProcessingException
void send(Event event)
event
- The event to broadcast.void subscribe(Receiver receiver)
void unsubscribe(Receiver receiver)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |