public final class ListenerRegistry extends Object implements javax.management.j2ee.ListenerRegistration
| Constructor and Description |
|---|
ListenerRegistry(String ip) |
| Modifier and Type | Method and Description |
|---|---|
void |
addNotificationListener(ObjectName name,
NotificationListener listener,
NotificationFilter filter,
Object handback)
Add a listener to a registered managed object.
|
void |
removeNotificationListener(ObjectName name,
NotificationListener listener)
Remove a listener from a registered managed object.
|
public ListenerRegistry(String ip)
public void addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws RemoteException
addNotificationListener in interface javax.management.j2ee.ListenerRegistrationname - The name of the managed object on which the listener should be added.listener - The listener object which will handle the notifications emitted by the registered managed object.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 managed object name provided does not match any of the registered managed objects.RemoteExceptionpublic void removeNotificationListener(ObjectName name, NotificationListener listener) throws RemoteException
removeNotificationListener in interface javax.management.j2ee.ListenerRegistrationname - The name of the managed object on which the listener should be removed.listener - The listener object which will handle the notifications emitted by the registered managed object.
This method will remove all the information related to this listener.InstanceNotFoundException - The managed object name provided does not match any of the registered managed objects.ListenerNotFoundException - The listener is not registered in the managed object.RemoteExceptionCopyright © 2017–2019 Eclipse Foundation. All rights reserved.