javax.management
Interface NotificationBroadcaster

All Known Subinterfaces:
ModelMBean, ModelMBeanNotificationBroadcaster
All Known Implementing Classes:
MBeanServerDelegate, NotificationBroadcasterSupport

public interface NotificationBroadcaster

Should be implemented by an MBean that emits Notifications. It allows a listener to be registered within the MBean as notification listener.


Method Summary
 void addNotificationListener(NotificationListener listener, NotificationFilter filter, java.lang.Object handback)
          Adds a listener to a registered MBean.
 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)
          Removes a listener from a registered MBean.
 

Method Detail

addNotificationListener

public void addNotificationListener(NotificationListener listener,
                                    NotificationFilter filter,
                                    java.lang.Object handback)
                             throws java.lang.IllegalArgumentException
Adds a listener to a registered MBean.
Parameters:
listener - The listener object which will handle the notifications emitted by the registered MBean.
filter - The filter object. If filter is null, no filtering will be performed before handling notifications.
handback - An opaque object to be sent back to the listener when a notification is emitted. This object cannot be used by the Notification broadcaster object. It should be resent unchanged with the notification to the listener.
Throws:
java.lang.IllegalArgumentException - Listener parameter is null.

removeNotificationListener

public void removeNotificationListener(NotificationListener listener)
                                throws ListenerNotFoundException
Removes a listener from a registered MBean.
Parameters:
name - The name of the MBean on which the listener should be removed.
listener - The listener object which will handle the notifications emitted by the registered MBean. This method will remove all the information related to this listener.
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.