javax.management
Interface NotificationBroadcaster

All Known Implementing Classes:
MBeanServerDelegate, NotificationBroadcasterSupport

public abstract interface NotificationBroadcaster

This interface should be implemented by a registered MBean. It allows a listener to be registered within the MBean as event listener.


Method Summary
 void addNotificationListener(NotificationListener listener, NotificationFilter filter, java.lang.Object handback)
          Enables a couple (listener,handback) for a registered MBean to be added.
 MBeanNotificationInfo[] getNotificationInfo()
          Returns a NotificationInfo object contaning the name of the Java class of the notification and the notification types sent.
 void removeNotificationListener(NotificationListener listener)
          Enables a listener for an MBean to be removed.
 

Method Detail

addNotificationListener

public void addNotificationListener(NotificationListener listener,
                                    NotificationFilter filter,
                                    java.lang.Object handback)
                             throws java.lang.IllegalArgumentException
Enables a couple (listener,handback) for a registered MBean to be added.
Parameters:
listener - The listener object which will handles notifications emitted by the registered MBean.
filter - The filter object. If not specified, no filtering will be performed before handling notifications.
handback - The context to be sent to the listener when a notification is emitted.
Throws:
java.lang.IllegalArgumentException - Listener parameter is null.

removeNotificationListener

public void removeNotificationListener(NotificationListener listener)
                                throws ListenerNotFoundException
Enables a listener for an MBean to be removed. All couple (listener, handback) are removed.
Parameters:
listener - The listener object which will handles notifications emitted by the registered MBean.
Throws:
ListenerNotFoundException - The listener is not registered in the MBean.

getNotificationInfo

public MBeanNotificationInfo[] getNotificationInfo()
Returns a NotificationInfo object contaning the name of the Java class of the notification and the notification types sent.