站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 jmx API Documentation 英文版文档

NotificationBroadcasterSupport (JBoss/JMX API) - JBoss 4.0.1 sp1 jmx API Documentation 英文版文档


javax.management
Class NotificationBroadcasterSupport

java.lang.Object
  extended byjavax.management.NotificationBroadcasterSupport
All Implemented Interfaces:
NotificationBroadcaster, NotificationEmitter
Direct Known Subclasses:
Monitor, RelationService, Timer

public class NotificationBroadcasterSupport
extends Object
implements NotificationEmitter

A helper class for notification broadcasters/emitters

Version:
$Revision: 1.9.2.1 $
Author:
Juha Lindfors., Adrian Brock.

Constructor Summary
NotificationBroadcasterSupport()
          Construct the new notification broadcaster support object
 
Method Summary
 void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
          Add a listener to an MBean.
 MBeanNotificationInfo[] getNotificationInfo()
          Returns the notification metadata associated with the MBean.
protected  void handleNotification(NotificationListener listener, Notification notification, Object handback)
          Handle the notification, the default implementation is to synchronously invoke the listener.
 void removeNotificationListener(NotificationListener listener)
          Removes a listener from an MBean.
 void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
          Removes a listener from the Emitter.
 void sendNotification(Notification notification)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotificationBroadcasterSupport

public NotificationBroadcasterSupport()
Construct the new notification broadcaster support object

Method Detail

addNotificationListener

public void addNotificationListener(NotificationListener listener,
                                    NotificationFilter filter,
                                    Object handback)
Description copied from interface: NotificationBroadcaster
Add a listener to an MBean.

Specified by:
addNotificationListener in interface NotificationBroadcaster
Parameters:
listener - implementation of the listener object
filter - implementation of the filter object or null if no filtering is required
handback - A handback object associated with each notification sent by this notification broadcaster.

removeNotificationListener

public void removeNotificationListener(NotificationListener listener)
                                throws ListenerNotFoundException
Description copied from interface: NotificationBroadcaster
Removes a listener from an MBean.

Specified by:
removeNotificationListener in interface NotificationBroadcaster
Parameters:
listener - the listener object to remove
Throws:
ListenerNotFoundException - if the listener was not found

removeNotificationListener

public void removeNotificationListener(NotificationListener listener,
                                       NotificationFilter filter,
                                       Object handback)
                                throws ListenerNotFoundException
Description copied from interface: NotificationEmitter
Removes a listener from the Emitter.

Only the listener, filter, handback triplet is removed

Specified by:
removeNotificationListener in interface NotificationEmitter
Parameters:
listener - the listener object to remove
filter - the filter registered with the listener
handback - the handback object associated with the registered listener
Throws:
ListenerNotFoundException - if the listener was not found

getNotificationInfo

public MBeanNotificationInfo[] getNotificationInfo()
Description copied from interface: NotificationBroadcaster
Returns the notification metadata associated with the MBean.

Specified by:
getNotificationInfo in interface NotificationBroadcaster
Returns:
MBean's notification metadata
See Also:
MBeanNotificationInfo

sendNotification

public void sendNotification(Notification notification)

handleNotification

protected void handleNotification(NotificationListener listener,
                                  Notification notification,
                                  Object handback)
Handle the notification, the default implementation is to synchronously invoke the listener.

Parameters:
listener - the listener to notify
notification - the notification
handback - the handback object


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.