public interface NotificationContext
EventListener can be registered to be notified.| 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
|
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() |
<T extends AbstractNotificationEvent> void addListener(EventListener<T> listener)
T - type of the eventlistener - NotificationContextException - if unable to infer the listened AbstractNotificationEvent subclass<T extends AbstractNotificationEvent> void addListener(Class<T> eventClass, EventListener<T> listener)
T - type of the eventeventClass - listener - <T extends AbstractNotificationEvent> boolean removeListener(EventListener<T> listener)
listener - NotificationContextException - if unable to infer the listened AbstractNotificationEvent subclassvoid clearListeners()
void notifyListeners(AbstractNotificationEvent event)
event - int size()
Copyright © 2015. All Rights Reserved.