javax.management
Interface NotificationBroadcaster

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

public interface NotificationBroadcaster

Implemented by an MBean that emits Notification.


Method Summary
 void addNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)
          Adds a listener to the registered MBean.
 javax.management.MBeanNotificationInfo[] getNotificationInfo()
          Returns the name of the java class of the notification and the notification types sent.
 void removeNotificationListener(javax.management.NotificationListener listener)
          Removes a listener.
 

Method Detail

getNotificationInfo

public javax.management.MBeanNotificationInfo[] getNotificationInfo()
Returns the name of the java class of the notification and the notification types sent.

Returns:
MBeanNotificationInfo The NotificationInfo

addNotificationListener

public void addNotificationListener(javax.management.NotificationListener listener,
                                    javax.management.NotificationFilter filter,
                                    java.lang.Object handback)
Adds a listener to the registered MBean.

Parameters:
listener - The listener that will handle the notifications emitted by the registered MBean.
filter - The NotificationFilter to use.
handback - The object to be sent back to the listener.
Throws:
java.lang.IllegalArgumentException - If listener is null.

removeNotificationListener

public void removeNotificationListener(javax.management.NotificationListener listener)
                                throws ListenerNotFoundException
Removes a listener. All entries corresponding to the listener will be removed (in the case of the listener being registered with different handbacks and filters ).

Parameters:
listener - The NotificationListener
Throws:
ListenerNotFoundException - If no such listener exists.