List of usage examples for javax.management MBeanServerConnection removeNotificationListener
public 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.
From source file:org.helios.collector.jmx.connection.AbstractMBeanServerConnectionFactory.java
/** * Removes a registered notification listener * @param objectName/*from w w w. j av a 2 s.co m*/ * @param listener * @param filter * @param handback * @throws InstanceNotFoundException * @throws ListenerNotFoundException * @throws IOException */ @Override @ManagedOperation public void removeNotificationListener(ObjectName objectName, ObjectName listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException, ListenerNotFoundException, IOException { validateConn(); MBeanServerConnection conn = null; try { conn = getPooledConnection(); conn.removeNotificationListener(objectName, listener, filter, handback); } catch (MBeanServerConnectionFactoryException e) { throw new RuntimeException("Failed to get pooled connection", e); } finally { try { this.returnPooledConnection(conn); } catch (Exception e) { log.debug(e.getMessage()); } } }
From source file:org.helios.collector.jmx.connection.AbstractMBeanServerConnectionFactory.java
/** * Removes a registered notification listener * @param objectName/*from www .j av a 2 s . c o m*/ * @param listener * @param filter * @param handback * @throws InstanceNotFoundException * @throws ListenerNotFoundException * @throws IOException */ @Override @ManagedOperation public void removeNotificationListener(ObjectName objectName, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException, ListenerNotFoundException, IOException { validateConn(); MBeanServerConnection conn = null; try { conn = getPooledConnection(); conn.removeNotificationListener(objectName, listener, filter, handback); } catch (MBeanServerConnectionFactoryException e) { throw new RuntimeException("Failed to get pooled connection", e); } finally { try { this.returnPooledConnection(conn); } catch (Exception e) { log.debug(e.getMessage()); } } }