com.sun.appserv.management.util.jmx
Class NotificationEmitterSupport
java.lang.Object
javax.management.NotificationBroadcasterSupport
com.sun.appserv.management.util.jmx.NotificationEmitterSupport
- All Implemented Interfaces:
- NotificationBroadcaster, NotificationEmitter
public class NotificationEmitterSupport
- extends NotificationBroadcasterSupport
Features:
- Maintains information on all NotificationListeners so that queries can
be made on the number of listeners, and the number of listeners of each type
- optionally sends all Notifications asynchronously via a separate Thread
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NotificationEmitterSupport
public NotificationEmitterSupport(boolean asyncDelivery)
cleanup
public void cleanup()
sendAll
public void sendAll()
- Synchronously (on current thread), ensure that all Notifications
have been delivered.
getListenerCount
public int getListenerCount()
getNotificationTypeListenerCount
public int getNotificationTypeListenerCount(String type)
addNotificationListener
public void addNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback)
- Specified by:
addNotificationListener
in interface NotificationBroadcaster
- Overrides:
addNotificationListener
in class NotificationBroadcasterSupport
removeNotificationListener
public void removeNotificationListener(NotificationListener listener)
throws ListenerNotFoundException
- Specified by:
removeNotificationListener
in interface NotificationBroadcaster
- Overrides:
removeNotificationListener
in class NotificationBroadcasterSupport
- Throws:
ListenerNotFoundException
removeNotificationListener
public void removeNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback)
throws ListenerNotFoundException
- Specified by:
removeNotificationListener
in interface NotificationEmitter
- Overrides:
removeNotificationListener
in class NotificationBroadcasterSupport
- Throws:
ListenerNotFoundException
internalSendNotification
protected void internalSendNotification(Notification notif)
sendNotification
public void sendNotification(Notification notif)
- Send the Notification. If created with async=true,
then this routine returns immediately and the Notification is sent
on a separate Thread.
- Overrides:
sendNotification
in class NotificationBroadcasterSupport
Submit a bug or feature Copyright 2006 Sun Microsystems, Inc. All rights reserved.