Ejemplo n.º 1
0
  /**
   * Adds a notification listener to the target bean.
   *
   * @throws Exception
   */
  protected void addNotificationListener() throws Exception {
    JMXEndpoint ep = (JMXEndpoint) getEndpoint();
    NotificationFilter nf = ep.getNotificationFilter();

    ObjectName objectName = ep.getJMXObjectName();

    getServerConnection().addNotificationListener(objectName, this, nf, ep.getHandback());
  }
Ejemplo n.º 2
0
 /** Removes the consumer as a listener from the bean. */
 protected void removeNotificationListener() throws Exception {
   JMXEndpoint ep = (JMXEndpoint) getEndpoint();
   getServerConnection().removeNotificationListener(ep.getJMXObjectName(), this);
 }