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.
Modifier and Type | Field and Description |
---|---|
protected ArrayList<org.apache.tomcat.util.modeler.BaseNotificationBroadcasterEntry> |
entries
The set of registered
BaseNotificationBroadcasterEntry
entries. |
Constructor and Description |
---|
BaseNotificationBroadcaster() |
Modifier and Type | Method and Description |
---|---|
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 |
sendNotification(Notification notification)
Send the specified notification to all interested listeners.
|
protected ArrayList<org.apache.tomcat.util.modeler.BaseNotificationBroadcasterEntry> entries
BaseNotificationBroadcasterEntry
entries.public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws IllegalArgumentException
addNotificationListener
in interface NotificationBroadcaster
listener
- Listener that will receive event notificationsfilter
- Filter object used to filter event notifications
actually delivered, or null
for no filteringhandback
- Handback object to be sent along with event
notificationsIllegalArgumentException
- if the listener parameter is nullpublic MBeanNotificationInfo[] getNotificationInfo()
MBeanNotificationInfo
object describing the
notifications sent by this MBean.getNotificationInfo
in interface NotificationBroadcaster
public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException
removeNotificationListener
in interface NotificationBroadcaster
listener
- The listener to be removed (any and all registrations
for this listener will be eliminated)ListenerNotFoundException
- if this listener is not
registered in the MBeanpublic void sendNotification(Notification notification)
notification
- The notification to be sentCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.