|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.base.NotificationEmitterAdapter
public class NotificationEmitterAdapter
An adapter class implementing the NotificationEmitter interface.
Note that the adapter must use hard references to its listeners as the original ones may have been wrapped by the MBean server with weak ones and they would be gced immediately if the emitter didn't maintain their hard references. So it's up to the listener to remove itself when it becomes stale.
| Constructor Summary | |
|---|---|
NotificationEmitterAdapter(NotificationEmitter adaptee)
Constructs a new notification emitter. |
|
| Method Summary | |
|---|---|
void |
addNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback)
|
void |
clearNotificationListeners()
Clears all notification listeners. |
MBeanNotificationInfo[] |
getNotificationInfo()
|
boolean |
hasListeners()
Checks whether there are notification listeners. |
void |
removeNotificationListener(NotificationListener listener)
|
void |
removeNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback)
|
void |
sendNotification(Notification notif)
Sends the specified notification. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NotificationEmitterAdapter(NotificationEmitter adaptee)
adaptee - the notification emitter adaptee.| Method Detail |
|---|
public void addNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback)
addNotificationListener in interface NotificationBroadcaster
public void removeNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback)
throws ListenerNotFoundException
removeNotificationListener in interface NotificationEmitterListenerNotFoundException
public void removeNotificationListener(NotificationListener listener)
throws ListenerNotFoundException
removeNotificationListener in interface NotificationBroadcasterListenerNotFoundExceptionpublic MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo in interface NotificationBroadcasterpublic void clearNotificationListeners()
public void sendNotification(Notification notif)
notif - the notification to send.public boolean hasListeners()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||