public void unsubscribe() { for(GcTracker tracker: trackers) { try { mserver.removeNotificationListener(tracker.name, LISTENER, null, tracker); } catch(Exception e) { } } }
public void removeNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException, ListenerNotFoundException { try { delegate.removeNotificationListener(name, listener, filter, handback); } catch(IOException e) { throw new RuntimeException(e); } }
public void removeNotificationListener(ObjectName name, ObjectName listener) throws InstanceNotFoundException, ListenerNotFoundException { try { delegate.removeNotificationListener(name, listener); } catch(IOException e) { throw new RuntimeException(e); } }
public void removeNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException, ListenerNotFoundException { try { delegate.removeNotificationListener(name, listener, filter, handback); } catch(IOException e) { throw new RuntimeException(e); } }
public void removeNotificationListener(ObjectName name, NotificationListener listener) throws InstanceNotFoundException, ListenerNotFoundException { try { delegate.removeNotificationListener(name, listener); } catch(IOException e) { throw new RuntimeException(e); } }
private synchronized void removeNotificationListener(int listenerId) throws ListenerNotFoundException, InstanceNotFoundException, IOException { Association association = listeners.remove(listenerId); if (association != null) { server.getMBeanServerConnection().removeNotificationListener(association.name, association.listener, association.filter, association.handback); } else { log.warnf("Request to removeNotificationListener, listener with ID %d not found.", listenerId); } }
private synchronized void removeNotificationListener(int listenerId) throws ListenerNotFoundException, InstanceNotFoundException, IOException { Association association = listeners.remove(listenerId); if (association != null) { server.getMBeanServerConnection().removeNotificationListener(association.name, association.listener, association.filter, association.handback); } else { log.warnf("Request to removeNotificationListener, listener with ID %d not found.", listenerId); } }
/** * Unregisters the specified {@code NotificationListener}. */ @Override public void destroy() { try { if (this.server != null && this.actualObjectNames != null) { for (ObjectName actualObjectName : this.actualObjectNames) { try { this.server.removeNotificationListener( actualObjectName, getNotificationListener(), getNotificationFilter(), getHandback()); } catch (Exception ex) { if (logger.isDebugEnabled()) { logger.debug("Unable to unregister NotificationListener", ex); } } } } } finally { this.connector.close(); } }
/** * Unregisters the specified {@code NotificationListener}. */ @Override public void destroy() { try { if (this.server != null && this.actualObjectNames != null) { for (ObjectName actualObjectName : this.actualObjectNames) { try { this.server.removeNotificationListener( actualObjectName, getNotificationListener(), getNotificationFilter(), getHandback()); } catch (Exception ex) { if (logger.isDebugEnabled()) { logger.debug("Unable to unregister NotificationListener", ex); } } } } } finally { this.connector.close(); } }
remoteNotificationManager.removeNotificationListeners(toRemove); } else if (count == 2) { server.getMBeanServerConnection().removeNotificationListener(name, listener); } else { server.getMBeanServerConnection().removeNotificationListener(name, listener, filter, handback);
remoteNotificationManager.removeNotificationListeners(toRemove); } else if (count == 2) { server.getMBeanServerConnection().removeNotificationListener(name, listener); } else { server.getMBeanServerConnection().removeNotificationListener(name, listener, filter, handback);
/** * Unregisters the notification listener. */ @Override protected void doStop() { this.logger.debug("Unregistering notifications"); if (this.server != null && this.mBeanObjectNames != null) { Collection<ObjectName> objectNames = this.retrieveMBeanNames(); for (ObjectName objectName : objectNames) { try { this.server.removeNotificationListener(objectName, this, this.filter, this.handback); } catch (InstanceNotFoundException e) { this.logger.error("Failed to find MBean instance.", e); } catch (ListenerNotFoundException e) { this.logger.error("Failed to find NotificationListener.", e); } catch (IOException e) { this.logger.error("IOException on MBeanServerConnection.", e); } } } }
/** * Remove a notification listener from the given MBeanServer while listening for MBeanServer registration events * @param pServer server from where to unregister * @param pListener listener to unregister */ public static void removeMBeanRegistrationListener(MBeanServerConnection pServer,NotificationListener pListener) { try { pServer.removeNotificationListener(JmxUtil.getMBeanServerDelegateName(), pListener); } catch (ListenerNotFoundException e) { // We silently ignore listeners not found, they might have been deregistered previously } catch (InstanceNotFoundException e) { throw new IllegalStateException("Cannot find " + getMBeanServerDelegateName() + " in server " + pServer,e); } catch (IOException e) { throw new IllegalStateException("IOException while registering notification listener for " + getMBeanServerDelegateName(),e); } }
public Object perform(Object[] args) throws Throwable { NotificationListener listener = (NotificationListener) args[0]; NotificationFilter filter = (NotificationFilter) args[1]; Object handback = args[2]; mbeanServerConnection.removeNotificationListener(objectName, listener, filter, handback); return null; } }
private static void removeListener(NotificationListener listener, MBeanServerConnection mbs) { try { if (listener != null) mbs.removeNotificationListener(L2MBeanNames.SERVER_DB_BACKUP, listener); } catch (Exception e) { System.err.println("Unable to remove Listener " + e.getMessage()); } }
private synchronized void removeNotificationListener(int listenerId) throws ListenerNotFoundException, InstanceNotFoundException, IOException { Association association = listeners.remove(listenerId); if (association != null) { server.getMBeanServerConnection().removeNotificationListener(association.name, association.listener, association.filter, association.handback); } else { log.warnf("Request to removeNotificationListener, listener with ID %d not found.", listenerId); } }
public void removeNotificationListener(ObjectName observed, NotificationListener listener, Subject delegate) throws InstanceNotFoundException, ListenerNotFoundException, IOException { NotificationTuple tuple = new NotificationTuple(observed, listener); synchronized (listeners) { listeners.remove(tuple); } getServer().removeNotificationListener(observed, listener); }
public void removeNotificationListener(ObjectName observed, NotificationListener listener, NotificationFilter filter, Object handback, Subject delegate) throws InstanceNotFoundException, ListenerNotFoundException, IOException { NotificationTuple tuple = new NotificationTuple(observed, listener, filter, handback); synchronized (listeners) { listeners.remove(tuple); } getServer().removeNotificationListener(observed, listener, filter, handback); } }
public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException { try { mirror.getMBeanServerConnection().removeNotificationListener(getRemoteObjectName(), listener); } catch (RuntimeException e) { throw e; } catch (ListenerNotFoundException e) { throw e; } catch (Exception e) { throw new RuntimeException(e); } }
public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException { try { mirror.getMBeanServerConnection().removeNotificationListener(getRemoteObjectName(), listener, filter, handback); } catch (RuntimeException e) { throw e; } catch (ListenerNotFoundException e) { throw e; } catch (Exception e) { throw new RuntimeException(e); } }