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

This interface should be used by new code in preference to the NotificationBroadcaster interface.

@since
1.5
@since.unbundled
JMX 1.2
Adds a listener to this MBean.
Parameters
listenerThe listener object which will handle the notifications emitted by the broadcaster.
filterThe filter object. If filter is null, no filtering will be performed before handling notifications.
handbackAn 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
IllegalArgumentExceptionListener parameter is null.

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.

Return
the array of possible notifications.
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
listenerA listener that was previously added to this MBean.
Throws
ListenerNotFoundExceptionThe listener is not registered with the MBean.

Removes a listener from this MBean. The MBean must have a listener that exactly matches the given listener, filter, and handback parameters. If there is more than one such listener, only one is removed.

The filter and handback parameters may be null if and only if they are null in a listener to be removed.

Parameters
listenerA listener that was previously added to this MBean.
filterThe filter that was specified when the listener was added.
handbackThe handback that was specified when the listener was added.
Throws
ListenerNotFoundExceptionThe listener is not registered with the MBean, or it is not registered with the given filter and handback.