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

## org.apache.tomcat.util.modeler
Class BaseNotificationBroadcaster

    java.lang.Object
      org.apache.tomcat.util.modeler.BaseNotificationBroadcaster

All Implemented Interfaces:
  NotificationBroadcaster

    public class BaseNotificationBroadcaster

extends Object
implements NotificationBroadcaster

Implementation of `NotificationBroadcaster` for attribute change notifications. This class is used by `BaseModelMBean` to handle notifications of attribute change events to interested listeners.

Author:
  Craig R. McClanahan, Costin Manolache

Field Summary
`protected ArrayList<org.apache.tomcat.util.modeler.BaseNotificationBroadcasterEntry>` | `entries` The set of registered `BaseNotificationBroadcasterEntry` entries.

Constructor Summary
`BaseNotificationBroadcaster()`

Method Summary
`void` | `addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)` Add a notification event listener to this MBean.
`MBeanNotificationInfo[]` | `getNotificationInfo()` Return an `MBeanNotificationInfo` object describing the notifications sent by this MBean.
`void` | `removeNotificationListener(NotificationListener listener)` Remove a notification event listener from this MBean.
`void` | `removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)` Remove a notification event listener from this MBean.
`void` | `removeNotificationListener(NotificationListener listener, Object handback)` Remove a notification event listener from this MBean.
`void` | `sendNotification(Notification notification)` Send the specified notification to all interested listeners.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### entries

    protected ArrayList<org.apache.tomcat.util.modeler.BaseNotificationBroadcasterEntry> entries

  The set of registered `BaseNotificationBroadcasterEntry` entries.

Constructor Detail

### BaseNotificationBroadcaster

    public BaseNotificationBroadcaster()

Method Detail

### addNotificationListener

    public void addNotificationListener(NotificationListener listener,
                                        NotificationFilter filter,
                                        Object handback)
                                 throws IllegalArgumentException

  Add a notification event listener to this MBean.

  Specified by:
    `addNotificationListener` in interface `NotificationBroadcaster`
  Parameters:
    `listener` - Listener that will receive event notifications
    `filter` - Filter object used to filter event notifications actually delivered, or `null` for no filtering
    `handback` - Handback object to be sent along with event notifications
  Throws:
    `IllegalArgumentException` - if the listener parameter is null

### getNotificationInfo

    public MBeanNotificationInfo[] getNotificationInfo()

  Return an `MBeanNotificationInfo` object describing the notifications sent by this MBean.

  Specified by:
    `getNotificationInfo` in interface `NotificationBroadcaster`

### removeNotificationListener

    public void removeNotificationListener(NotificationListener listener)
                                    throws ListenerNotFoundException

  Remove a notification event listener from this MBean.

  Specified by:
    `removeNotificationListener` in interface `NotificationBroadcaster`
  Parameters:
    `listener` - The listener to be removed (any and all registrations for this listener will be eliminated)
  Throws:
    `ListenerNotFoundException` - if this listener is not registered in the MBean

### removeNotificationListener

    public void removeNotificationListener(NotificationListener listener,
                                           Object handback)
                                    throws ListenerNotFoundException

  Remove a notification event listener from this MBean.

  Parameters:
    `listener` - The listener to be removed (any and all registrations for this listener will be eliminated)
    `handback` - Handback object to be sent along with event notifications
  Throws:
    `ListenerNotFoundException` - if this listener is not registered in the MBean

### removeNotificationListener

    public void removeNotificationListener(NotificationListener listener,
                                           NotificationFilter filter,
                                           Object handback)
                                    throws ListenerNotFoundException

  Remove a notification event listener from this MBean.

  Parameters:
    `listener` - The listener to be removed (any and all registrations for this listener will be eliminated)
    `filter` - Filter object used to filter event notifications actually delivered, or `null` for no filtering
    `handback` - Handback object to be sent along with event notifications
  Throws:
    `ListenerNotFoundException` - if this listener is not registered in the MBean

### sendNotification

    public void sendNotification(Notification notification)

  Send the specified notification to all interested listeners.

  Parameters:
    `notification` - The notification to be sent

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

Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.