Registers an object which implements the NotificationListener interface as a listener. This
object's 'handleNotification()' method will be invoked when any attributeChangeNotification is issued through
or by the ModelMBean. This does not include other Notifications. They must be registered
for independently. An AttributeChangeNotification will be generated for this attributeName.
Parameters:
-
listener - The listener object which will handles notifications emitted by the registered MBean.
-
attributeName - The name of the ModelMBean attribute for which to receive change notifications.
If null, then all attribute changes will cause an attributeChangeNotification to be issued.
-
handback - The context to be sent to the listener with the notification when a notification is emitted.
Throws:
-
IllegalArgumentException - The listener cannot be null.
-
MBeanException - Wraps a distributed communication Exception.
-
RuntimeOperationsException - Wraps an IllegalArgumentException The attribute name passed in parameter does not exist.
See Also:
ModelMBeanNotificationBroadcaster.removeAttributeChangeNotificationListener(javax.management.NotificationListener, java.lang.String)
,