Package org.jppf.jmxremote.notification
Class ServerNotificationHandler
java.lang.Object
org.jppf.jmxremote.notification.ServerNotificationHandler
Server-side interface for registering and unregistering notifications listeners, as well as dispatching local notifications to remote listeners.
- Author:
- Laurent Cohen
-
Constructor Summary
ConstructorsConstructorDescriptionInitialize with the specified nio server. -
Method Summary
Modifier and TypeMethodDescriptionintaddNotificationListener(MBeanServer mbeanServer, String connectionID, ObjectName mbeanName, NotificationFilter filter) Add a notification listener.voidremoveNotificationListeners(MBeanServer mbeanServer, ObjectName mbeanName, int[] listenerIDs) Unregister the specified listener ids from the specified MBean.
-
Constructor Details
-
ServerNotificationHandler
Initialize with the specified nio server.- Parameters:
server- the nio server.
-
-
Method Details
-
addNotificationListener
public int addNotificationListener(MBeanServer mbeanServer, String connectionID, ObjectName mbeanName, NotificationFilter filter) throws Exception Add a notification listener.- Parameters:
mbeanServer- the mbeanServer on which to to register the listener.connectionID- the id of the connection to which notifications will be forwarded.mbeanName- the name of the MBean for which to subscribe to notifications.filter- the filter associated to the listener, may be null.- Returns:
- a unique integer uniquely identifying the new listener.
- Throws:
Exception- if any error occurs.
-
removeNotificationListeners
public void removeNotificationListeners(MBeanServer mbeanServer, ObjectName mbeanName, int[] listenerIDs) throws Exception Unregister the specified listener ids from the specified MBean.- Parameters:
mbeanServer- the mbeanServer on which to to register the listener.mbeanName- name of the MBean from which to rmeove the listeners.listenerIDs- the ids of the listeners to remove.- Throws:
Exception- if any error occurs.
-