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.

Version:

1.9

Author:

Attilio Mattiocco, Chiara Montecchio

 

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 notificationListener)
    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 notificationListener)
                                throws ListenerNotFoundException

Removes a listener from a registered MBean.

 

Parameters:

notificationListener - The registered listener object.

 

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.