public class EventNotificationManager extends Object
EventListener objects to
particular event types. Moreover, it handles the dispatching of the events.
This class is thread-safe.| Constructor and Description |
|---|
EventNotificationManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
deliverEvent(AbstractTaskEvent event)
Delivers a event to all of the registered subscribers.
|
void |
subscribeToEvent(EventListener eventListener,
Class<? extends AbstractTaskEvent> eventType)
Subscribes the given event listener object to the specified event type.
|
void |
unsubscribeFromEvent(EventListener eventListener,
Class<? extends AbstractEvent> eventType)
Removes a subscription of an
EventListener object for the given event type. |
public void subscribeToEvent(EventListener eventListener, Class<? extends AbstractTaskEvent> eventType)
eventListener - the EventListener object to create the subscription foreventType - the event type the given listener object wants to be notified aboutpublic void unsubscribeFromEvent(EventListener eventListener, Class<? extends AbstractEvent> eventType)
EventListener object for the given event type.eventListener - the event listener to remove the subscription foreventType - the event type to remove the subscription forpublic void deliverEvent(AbstractTaskEvent event)
event - The event to deliver.Copyright © 2014 The Apache Software Foundation. All rights reserved.