|
Java™ Platform Standard Ed. 7 DRAFT ea-b76 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface NotificationManager
This interface specifies methods to add and remove notification listeners on named MBeans.
| Modifier and Type | Method and Description |
|---|---|
void |
addNotificationListener(ObjectName name,
NotificationListener listener,
NotificationFilter filter,
Object handback)
Adds a listener to a registered MBean. |
void |
removeNotificationListener(ObjectName name,
NotificationListener listener)
Removes a listener from a registered MBean. |
void |
removeNotificationListener(ObjectName name,
NotificationListener listener,
NotificationFilter filter,
Object handback)
Removes a listener from a registered MBean. |
| Method Detail |
|---|
void addNotificationListener(ObjectName name,
NotificationListener listener,
NotificationFilter filter,
Object handback)
throws InstanceNotFoundException,
IOException
Adds a listener to a registered MBean. Notifications emitted by the MBean will be forwarded to the listener.
name - The name of the MBean on which the listener should
be added.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 - The context to be sent to the listener when a
notification is emitted.InstanceNotFoundException - The MBean name provided
does not match any of the registered MBeans.IOException - A communication problem occurred when
talking to the MBean server.removeNotificationListener(ObjectName, NotificationListener),
removeNotificationListener(ObjectName, NotificationListener,
NotificationFilter, Object)
void removeNotificationListener(ObjectName name,
NotificationListener listener)
throws InstanceNotFoundException,
ListenerNotFoundException,
IOException
Removes a listener from a registered MBean.
If the listener is registered more than once, perhaps with different filters or callbacks, this method will remove all those registrations.
name - The name of the MBean on which the listener should
be removed.listener - The listener to be removed.InstanceNotFoundException - The MBean name provided
does not match any of the registered MBeans.ListenerNotFoundException - The listener is not
registered in the MBean.IOException - A communication problem occurred when
talking to the MBean server.addNotificationListener(ObjectName, NotificationListener,
NotificationFilter, Object)
void removeNotificationListener(ObjectName name,
NotificationListener listener,
NotificationFilter filter,
Object handback)
throws InstanceNotFoundException,
ListenerNotFoundException,
IOException
Removes a listener from a registered MBean.
The MBean must have a listener that exactly matches the
given listener, filter, and
handback parameters. If there is more than one
such listener, only one is removed.
The filter and handback parameters
may be null if and only if they are null in a listener to be
removed.
name - The name of the MBean on which the listener should
be removed.listener - The listener to be removed.filter - The filter that was specified when the listener
was added.handback - The handback that was specified when the
listener was added.InstanceNotFoundException - The MBean name provided
does not match any of the registered MBeans.ListenerNotFoundException - The listener is not
registered in the MBean, or it is not registered with the given
filter and handback.IOException - A communication problem occurred when
talking to the MBean server.addNotificationListener(ObjectName, NotificationListener,
NotificationFilter, Object)
|
Java™ Platform Standard Ed. 7 DRAFT ea-b76 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.