public final class GlobalNotificationContext extends Object
| Modifier and Type | Method and Description |
|---|---|
<T extends AbstractNotificationEvent> |
addListener(Class<T> eventClass,
EventListener<T> listener)
Adds the input listeners to the context to listen on the input event class.
|
<T extends AbstractNotificationEvent> |
addListener(EventListener<T> listener)
Adds the input listeners to the context.
|
void |
clearListeners()
Clears the list of listeners for this context
|
static NotificationContext |
getContext() |
void |
notifyListeners(AbstractNotificationEvent event)
Notifies the listeners about the input event
|
<T extends AbstractNotificationEvent> |
removeListener(EventListener<T> listener)
Remove the input listener from the context .
|
int |
size() |
public static NotificationContext getContext()
public void notifyListeners(AbstractNotificationEvent event)
NotificationContextnotifyListeners in interface NotificationContextpublic <T extends AbstractNotificationEvent> void addListener(EventListener<T> listener)
NotificationContextaddListener in interface NotificationContextT - type of the eventpublic <T extends AbstractNotificationEvent> void addListener(Class<T> eventClass, EventListener<T> listener)
NotificationContextaddListener in interface NotificationContextT - type of the eventpublic <T extends AbstractNotificationEvent> boolean removeListener(EventListener<T> listener)
NotificationContextremoveListener in interface NotificationContextpublic void clearListeners()
NotificationContextclearListeners in interface NotificationContextpublic int size()
size in interface NotificationContextCopyright © 2015. All Rights Reserved.