public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException { registry.remove(listener, filter, handback); }
/** * Removes all registrations for a listener. * * @param name the object name * @param listener the listener to remove * @exception ListenerNotFoundException when the listener is not registered * @exception IllegalArgumentException for a null object name */ public void remove(ObjectName name, NotificationListener listener) throws ListenerNotFoundException { if (name == null) throw new IllegalArgumentException("Null name"); synchronized(registries) { ListenerRegistry registry = (ListenerRegistry) registries.get(name); if (registry == null) throw new ListenerNotFoundException("Listener not found " + listener + " for object name " + name); registry.remove(listener); if (registry.isEmpty()) registries.remove(name); } }
/** * Removes all registrations for a listener. * * @param name the object name * @param listener the listener to remove * @exception ListenerNotFoundException when the listener is not registered * @exception IllegalArgumentException for a null object name */ public void remove(ObjectName name, NotificationListener listener) throws ListenerNotFoundException { if (name == null) throw new IllegalArgumentException("Null name"); synchronized(registries) { ListenerRegistry registry = (ListenerRegistry) registries.get(name); if (registry == null) throw new ListenerNotFoundException("Listener not found " + listener + " for object name " + name); registry.remove(listener); if (registry.isEmpty()) registries.remove(name); } }
/** * Removes only the registrations for a listener that match the filter and handback. * * @param name the object name * @param listener the listener to remove * @param filter the filter of the registration to remove * @param handback the handback object of the registration to remove * @exception ListenerNotFoundException when the listener is not registered * @exception IllegalArgumentException for a null object name */ public void remove(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException { if (name == null) throw new IllegalArgumentException("Null name"); synchronized(registries) { ListenerRegistry registry = (ListenerRegistry) registries.get(name); if (registry == null) throw new ListenerNotFoundException("Listener not found listener=" + listener + " filter=" + filter + " handback=" + handback + " for object name " + name); registry.remove(listener, filter, handback); if (registry.isEmpty()) registries.remove(name); } }
/** * Removes only the registrations for a listener that match the filter and handback. * * @param name the object name * @param listener the listener to remove * @param filter the filter of the registration to remove * @param handback the handback object of the registration to remove * @exception ListenerNotFoundException when the listener is not registered * @exception IllegalArgumentException for a null object name */ public void remove(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException { if (name == null) throw new IllegalArgumentException("Null name"); synchronized(registries) { ListenerRegistry registry = (ListenerRegistry) registries.get(name); if (registry == null) throw new ListenerNotFoundException("Listener not found listener=" + listener + " filter=" + filter + " handback=" + handback + " for object name " + name); registry.remove(listener, filter, handback); if (registry.isEmpty()) registries.remove(name); } }