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
486300
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);
        }

    }
1058066
public void unregisterMBean(final ObjectName name) throws JMException {
    if ((beanServer != null) &&
        beanServer.isRegistered(name) &&
        registeredMBeanNames.remove(name)) {
      beanServer.unregisterMBean(name);
    }
  }
421697
@NonNull
    public Transition removeListener(@NonNull TransitionListener listener) {
        if (mListeners == null) {
            return this;
        }
        mListeners.remove(listener);
        if (mListeners.size() == 0) {
            mListeners = null;
        }
        return this;
    }
974572
def removeNotificationListener(listener, filter=nil, handback=nil)
      found = false
      listeners.delete_if do |clistener, (cfilter, chandback)|
        v = listener == clistener && filter == cfilter && handback == chandback
        found = true if v
        v
      end
      raise javax.management.ListenerNotFoundException.new unless found
    end
891556
public void removeNotificationHandler(String serviceName, NotificationHandler handler){

        ServiceInstanceUtils.validateServiceName(serviceName);
        if (handler == null) {
            throw new ServiceException(ErrorCode.SERVICE_DIRECTORY_NULL_ARGUMENT_ERROR,
                    ErrorCode.SERVICE_DIRECTORY_NULL_ARGUMENT_ERROR.getMessageTemplate(),
                    "NotificationHandler");
        }
  
        synchronized(notificationHandlers){
            if(notificationHandlers.containsKey(serviceName)){
                List<NotificationHandler> list = notificationHandlers.get(serviceName);
                if(list.contains(handler)){
                    list.remove(handler);
                }
                if(list.isEmpty()){
                    notificationHandlers.remove(serviceName);
                }
            }
        }
    }
703939
public void removeBOSHClientConnListener(
            final BOSHClientConnListener listener) {
        if (listener == null) {
            throw(new IllegalArgumentException(NULL_LISTENER));
        }
        connListeners.remove(listener);
    }
699226
public static void unregisterMbean(MBeanServer server, ObjectName name) {
        try {
            server.unregisterMBean(name);
        } catch(Exception e) {
            logger.error("Error unregistering mbean", e);
        }
    }
869379
public void removeClientNotificationListener(RESTRequest request, ObjectName name) {
        NotificationTargetInformation nti = toNotificationTargetInformation(request, name.getCanonicalName());

        // Remove locally
        ClientNotificationListener listener = listeners.remove(nti);

        // Check whether the producer of the notification is local or remote.
        if (nti.getRoutingInformation() == null) {
            // Remove the notification from the MBeanServer
            MBeanServerHelper.removeClientNotification(name, listener);
        } else {
            // Remove the notification listener from the Target-Client Manager through EventAdmin
            MBeanRoutedNotificationHelper helper = MBeanRoutedNotificationHelper.getMBeanRoutedNotificationHelper();
            helper.removeRoutedNotificationListener(nti, listener);
        }
    }
1274689
public static synchronized void removeListener(int fileDescriptor) {
        if (listeners.containsKey(fileDescriptor)) {
            listeners.remove(fileDescriptor);
            disableSerialDataReceiveCallback(fileDescriptor);
        }
    }
1284691
public void removeListener(AnimatorListener listener) {
        if (mListeners == null) {
            return;
        }
        mListeners.remove(listener);
        if (mListeners.size() == 0) {
            mListeners = null;
        }
    }
494104
public void removeListener( IDmListener listener ) {

		if( listener != null ) {
			synchronized( this.dmListeners ) {
				this.dmListeners.remove( listener );
			}

			this.logger.info( "The listener '" + listener.getId() + "' is not available anymore in Roboconf's DM." );
		} else {
			this.logger.info( "An invalid DM listener was removed." );
		}

		listListeners();
	}
57255
public void removeInventoryListener(InventoryListener listener) {
        this.inventoryListenerSupport.inventoryListenerRWLock.writeLock().lock();
        try {
            status.assertInitialOrStopped(getClass(), "removeInventoryListener()");
            this.inventoryListenerSupport.inventoryListeners.remove(listener);
            LOG.debugf("Removed inventory listener [%s] for endpoint [%s]", listener, getMonitoredEndpoint());
        } finally {
            this.inventoryListenerSupport.inventoryListenerRWLock.writeLock().unlock();
        }
    }
616339
public boolean removeConnectedEventListener(PeerConnectedEventListener listener) {
        boolean result = ListenerRegistration.removeFromList(listener, peerConnectedEventListeners);
        for (Peer peer : getConnectedPeers())
            peer.removeConnectedEventListener(listener);
        for (Peer peer : getPendingPeers())
            peer.removeConnectedEventListener(listener);
        return result;
    }
369110
public void removeListener(BaseListener listener, boolean bFreeListener)
    {
        if (m_listener != null)
        {
            if (m_listener == listener)
            {
                m_listener = (FieldListener)listener.getNextListener();
                listener.unlink(bFreeListener);     // remove theBehavior from the linked list
            }
            else
                m_listener.removeListener(listener, bFreeListener);
        } // Remember to free the listener after removing it!
    }
1112488
public void removeMembershipEventListener(MembershipEventListener listener)
   {
      SecurityHelper.validateSecurityPermission(PermissionConstants.MANAGE_LISTENERS);
      listeners.remove(listener);
   }
940064
def remove_notification_listener(self, notification_id):
    

    for v in self.notifications.values():
      toRemove = list(filter(lambda tup: tup[0] == notification_id, v))
      if len(toRemove) > 0:
        v.remove(toRemove[0])
        return True

    return False
1176007
public void removeListener(SettingsEntityListener settingsEntityListener) {
    RunAsSystemAspect.runAsSystem(
        () ->
            entityListenersService.removeEntityListener(
                entityTypeId,
                new EntityListener() {

                  @Override
                  public void postUpdate(Entity entity) {
                    settingsEntityListener.postUpdate(entity);
                  }

                  @Override
                  public Object getEntityId() {
                    return getEntityType().getId();
                  }
                }));
  }