javax.management
Interface NotificationBroadcaster

All Known Subinterfaces:
HAServiceMBean (src) , HASingletonControllerMBean (src) , HASingletonMBean (src) , MBeanInvoker (src) , ModelMBean (src) , ModelMBeanNotificationBroadcaster (src) , NetworkRegistryMBean (src) , NotificationEmitter (src)
All Known Implementing Classes:
AbstractMBeanInvoker (src) , BroadcasterInvocationHandlerTest (src) , EmitterInvocationHandlerTest (src) , HAServiceMBeanSupport (src) , HASingletonController (src) , HASingletonSupport (src) , JBossNotificationBroadcasterSupport (src) , MBeanServerDelegate (src) , ModelMBeanInvoker (src) , NetworkRegistry (src) , NotificationBroadcasterSupport (src) , RequiredModelMBean (src) , ServerImpl (src) , UnifiedLoaderRepository3 (src)

public interface NotificationBroadcaster

This interface must be implemented by all MBeans that emit notifications.

New code should implement the NotificationEmitter interface

See Also:
NotificationListener (src) , NotificationFilter (src) , NotificationEmitter (src)

Method Summary
 void addNotificationListener(NotificationListener (src)  listener, NotificationFilter (src)  filter, java.lang.Object handback)
          Add a listener to an MBean.
 MBeanNotificationInfo (src) [] getNotificationInfo()
          Returns the notification metadata associated with the MBean.
 void removeNotificationListener(NotificationListener (src)  listener)
          Removes a listener from an MBean.
 

Method Detail

addNotificationListener

public void addNotificationListener(NotificationListener (src)  listener,
                                    NotificationFilter (src)  filter,
                                    java.lang.Object handback)
                             throws java.lang.IllegalArgumentException
Add a listener to an MBean.

Parameters:
listener - implementation of the listener object
filter - implementation of the filter object or null if no filtering is required
handback - A handback object associated with each notification sent by this notification broadcaster.
Throws:
java.lang.IllegalArgumentException - if listener is null

removeNotificationListener

public void removeNotificationListener(NotificationListener (src)  listener)
                                throws ListenerNotFoundException (src) 
Removes a listener from an MBean.

Parameters:
listener - the listener object to remove
Throws:
ListenerNotFoundException (src) - if the listener was not found

getNotificationInfo

public MBeanNotificationInfo (src) [] getNotificationInfo()
Returns the notification metadata associated with the MBean.

Returns:
MBean's notification metadata
See Also:
MBeanNotificationInfo (src)