javax.management
Interface NotificationBroadcaster

All Known Subinterfaces:
ModelMBean sample code for javax.management.modelmbean.ModelMBean definition code for javax.management.modelmbean.ModelMBean , ModelMBeanNotificationBroadcaster sample code for javax.management.modelmbean.ModelMBeanNotificationBroadcaster definition code for javax.management.modelmbean.ModelMBeanNotificationBroadcaster , NotificationEmitter sample code for javax.management.NotificationEmitter definition code for javax.management.NotificationEmitter
All Known Implementing Classes:
CounterMonitor sample code for javax.management.monitor.CounterMonitor definition code for javax.management.monitor.CounterMonitor , GaugeMonitor sample code for javax.management.monitor.GaugeMonitor definition code for javax.management.monitor.GaugeMonitor , JMXConnectorServer sample code for javax.management.remote.JMXConnectorServer definition code for javax.management.remote.JMXConnectorServer , MBeanServerDelegate sample code for javax.management.MBeanServerDelegate definition code for javax.management.MBeanServerDelegate , Monitor sample code for javax.management.monitor.Monitor definition code for javax.management.monitor.Monitor , NotificationBroadcasterSupport sample code for javax.management.NotificationBroadcasterSupport definition code for javax.management.NotificationBroadcasterSupport , RelationService sample code for javax.management.relation.RelationService definition code for javax.management.relation.RelationService , RequiredModelMBean sample code for javax.management.modelmbean.RequiredModelMBean definition code for javax.management.modelmbean.RequiredModelMBean , RMIConnectorServer sample code for javax.management.remote.rmi.RMIConnectorServer definition code for javax.management.remote.rmi.RMIConnectorServer , StringMonitor sample code for javax.management.monitor.StringMonitor definition code for javax.management.monitor.StringMonitor , Timer sample code for javax.management.timer.Timer definition code for javax.management.timer.Timer

public interface NotificationBroadcaster

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

New code should use the NotificationEmitter sample code for javax.management.NotificationEmitter definition code for javax.management.NotificationEmitter interface instead.

Since:
1.5

Method Summary
 void addNotificationListener sample code for javax.management.NotificationBroadcaster.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.NotificationBroadcaster.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) (NotificationListener sample code for javax.management.NotificationListener definition code for javax.management.NotificationListener  listener, NotificationFilter sample code for javax.management.NotificationFilter definition code for javax.management.NotificationFilter  filter, Object sample code for java.lang.Object definition code for java.lang.Object  handback)
          Adds a listener to this MBean.
 MBeanNotificationInfo sample code for javax.management.MBeanNotificationInfo definition code for javax.management.MBeanNotificationInfo [] getNotificationInfo sample code for javax.management.NotificationBroadcaster.getNotificationInfo() definition code for javax.management.NotificationBroadcaster.getNotificationInfo() ()
          Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type.
 void removeNotificationListener sample code for javax.management.NotificationBroadcaster.removeNotificationListener(javax.management.NotificationListener) definition code for javax.management.NotificationBroadcaster.removeNotificationListener(javax.management.NotificationListener) (NotificationListener sample code for javax.management.NotificationListener definition code for javax.management.NotificationListener  listener)
          Removes a listener from this MBean.
 

Method Detail

addNotificationListener sample code for javax.management.NotificationBroadcaster.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.NotificationBroadcaster.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)

void addNotificationListener(NotificationListener sample code for javax.management.NotificationListener definition code for javax.management.NotificationListener  listener,
                             NotificationFilter sample code for javax.management.NotificationFilter definition code for javax.management.NotificationFilter  filter,
                             Object sample code for java.lang.Object definition code for java.lang.Object  handback)
                             throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException 
Adds a listener to this MBean.

Parameters:
listener - The listener object which will handle the notifications emitted by the broadcaster.
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:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - Listener parameter is null.
See Also:
removeNotificationListener(javax.management.NotificationListener) sample code for javax.management.NotificationBroadcaster.removeNotificationListener(javax.management.NotificationListener) definition code for javax.management.NotificationBroadcaster.removeNotificationListener(javax.management.NotificationListener)

removeNotificationListener sample code for javax.management.NotificationBroadcaster.removeNotificationListener(javax.management.NotificationListener) definition code for javax.management.NotificationBroadcaster.removeNotificationListener(javax.management.NotificationListener)

void removeNotificationListener(NotificationListener sample code for javax.management.NotificationListener definition code for javax.management.NotificationListener  listener)
                                throws ListenerNotFoundException sample code for javax.management.ListenerNotFoundException definition code for javax.management.ListenerNotFoundException 
Removes a listener from this MBean. If the listener has been registered with different handback objects or notification filters, all entries corresponding to the listener will be removed.

Parameters:
listener - A listener that was previously added to this MBean.
Throws:
ListenerNotFoundException sample code for javax.management.ListenerNotFoundException definition code for javax.management.ListenerNotFoundException - The listener is not registered with the MBean.
See Also:
addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) sample code for javax.management.NotificationBroadcaster.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.NotificationBroadcaster.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) , NotificationEmitter.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) sample code for javax.management.NotificationEmitter.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.NotificationEmitter.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)

getNotificationInfo sample code for javax.management.NotificationBroadcaster.getNotificationInfo() definition code for javax.management.NotificationBroadcaster.getNotificationInfo()

MBeanNotificationInfo sample code for javax.management.MBeanNotificationInfo definition code for javax.management.MBeanNotificationInfo [] getNotificationInfo()

Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type.

It is not illegal for the MBean to send notifications not described in this array. However, some clients of the MBean server may depend on the array being complete for their correct functioning.

Returns:
the array of possible notifications.