Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.management
Interface NotificationBroadcaster

All Known Subinterfaces:
  ModelMBean, ModelMBeanNotificationBroadcaster, NotificationEmitter

All Known Implementing Classes:
  MBeanServerDelegate, NotificationBroadcasterSupport, RequiredModelMBean

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.

Author:
  Young Yang

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 listener)` 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 listener)
                                    throws ListenerNotFoundException

  Removes a listener from a registered MBean.

  Parameters:
    `listener` - The listener object which will handle the notifications emitted by the registered MBean. This method will remove all the information related to this listener.
  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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD