public final class NotificationEmitterSupport extends NotificationBroadcasterSupport
For async use, a shared sender thread is used for all Notifications.
Constructor and Description |
---|
NotificationEmitterSupport(boolean asyncDelivery) |
Modifier and Type | Method and Description |
---|---|
void |
addNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback) |
void |
cleanup() |
int |
getListenerCount() |
int |
getNotificationTypeListenerCount(String type) |
protected void |
internalSendNotification(Notification notif) |
void |
removeNotificationListener(NotificationListener listener) |
void |
removeNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback) |
void |
sendAll()
Synchronously (on current thread), ensure that all Notifications
have been delivered.
|
void |
sendNotification(Notification notif)
Send the Notification.
|
getNotificationInfo, handleNotification
public NotificationEmitterSupport(boolean asyncDelivery)
public void cleanup()
public void sendAll()
public int getListenerCount()
public int getNotificationTypeListenerCount(String type)
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
addNotificationListener
in interface NotificationBroadcaster
addNotificationListener
in class NotificationBroadcasterSupport
public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException
removeNotificationListener
in interface NotificationBroadcaster
removeNotificationListener
in class NotificationBroadcasterSupport
ListenerNotFoundException
public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException
removeNotificationListener
in interface NotificationEmitter
removeNotificationListener
in class NotificationBroadcasterSupport
ListenerNotFoundException
protected void internalSendNotification(Notification notif)
public void sendNotification(Notification notif)
sendNotification
in class NotificationBroadcasterSupport
Copyright © 2018. All rights reserved.