org.apache.commons.modeler
Class BaseNotificationBroadcaster
java.lang.Object
|
+--org.apache.commons.modeler.BaseNotificationBroadcaster
- All Implemented Interfaces:
- javax.management.NotificationBroadcaster
- public class BaseNotificationBroadcaster
- extends java.lang.Object
- implements javax.management.NotificationBroadcaster
Implementation of NotificationBroadcaster
for attribute change
notifications. This class is used by BaseModelMBean
to
handle notifications of attribute change events to interested listeners.
- Version:
- $Revision: 1.1.1.1 $ $Date: 2002/04/30 20:58:51 $
- Author:
- Craig R. McClanahan
Field Summary |
protected java.util.ArrayList |
entries
The set of registered BaseNotificationBroadcasterEntry
entries. |
Method Summary |
void |
addNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
Add a notification event listener to this MBean. |
javax.management.MBeanNotificationInfo[] |
getNotificationInfo()
Return an MBeanNotificationInfo object describing the
notifications sent by this MBean. |
void |
removeNotificationListener(javax.management.NotificationListener listener)
Remove a notification event listener from this MBean. |
void |
removeNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
Remove a notification event listener from this MBean. |
void |
removeNotificationListener(javax.management.NotificationListener listener,
java.lang.Object handback)
Remove a notification event listener from this MBean. |
void |
sendNotification(javax.management.Notification notification)
Send the specified notification to all interested listeners. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
entries
protected java.util.ArrayList entries
- The set of registered
BaseNotificationBroadcasterEntry
entries.
BaseNotificationBroadcaster
public BaseNotificationBroadcaster()
addNotificationListener
public void addNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
throws java.lang.IllegalArgumentException
- Add a notification event listener to this MBean.
- Specified by:
addNotificationListener
in interface javax.management.NotificationBroadcaster
- Parameters:
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
notifications- Throws:
java.lang.IllegalArgumentException
- if the listener parameter is null
getNotificationInfo
public javax.management.MBeanNotificationInfo[] getNotificationInfo()
- Return an
MBeanNotificationInfo
object describing the
notifications sent by this MBean.
- Specified by:
getNotificationInfo
in interface javax.management.NotificationBroadcaster
removeNotificationListener
public void removeNotificationListener(javax.management.NotificationListener listener)
throws javax.management.ListenerNotFoundException
- Remove a notification event listener from this MBean.
- Specified by:
removeNotificationListener
in interface javax.management.NotificationBroadcaster
- Parameters:
listener
- The listener to be removed (any and all registrations
for this listener will be eliminated)- Throws:
javax.management.ListenerNotFoundException
- if this listener is not
registered in the MBean
removeNotificationListener
public void removeNotificationListener(javax.management.NotificationListener listener,
java.lang.Object handback)
throws javax.management.ListenerNotFoundException
- Remove a notification event listener from this MBean.
- Specified by:
removeNotificationListener
in interface javax.management.NotificationBroadcaster
- 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:
javax.management.ListenerNotFoundException
- if this listener is not
registered in the MBean
removeNotificationListener
public void removeNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
throws javax.management.ListenerNotFoundException
- Remove a notification event listener from this MBean.
- Specified by:
removeNotificationListener
in interface javax.management.NotificationBroadcaster
- 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 filteringhandback
- Handback object to be sent along with event
notifications- Throws:
javax.management.ListenerNotFoundException
- if this listener is not
registered in the MBean
sendNotification
public void sendNotification(javax.management.Notification notification)
- Send the specified notification to all interested listeners.
- Parameters:
notification
- The notification to be sent
Copyright (c) 2001-2002 - Apache Software Foundation