Class ServerNotificationHandler

java.lang.Object
org.jppf.jmxremote.notification.ServerNotificationHandler

public class ServerNotificationHandler extends Object
Server-side interface for registering and unregistering notifications listeners, as well as dispatching local notifications to remote listeners.
Author:
Laurent Cohen
  • Constructor Details

    • ServerNotificationHandler

      public ServerNotificationHandler(JMXNioServer server)
      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.