Remove the NotificationHandler from the Service.

@param serviceName
the service name.
@param handler
the NotificationHandler for the service.
961934
public void removeNotificationHandler(String serviceName, NotificationHandler handler){
        if(handler == null || serviceName == null || serviceName.isEmpty()){
            throw new IllegalArgumentException();
        }

        synchronized(notificationHandlers){
            if(notificationHandlers.containsKey(serviceName)){
                List<NotificationHandler> list = notificationHandlers.get(serviceName);
                if(list.contains(handler)){
                    list.remove(handler);
                }
                if(list.size() == 0){
                    notificationHandlers.remove(serviceName);
                }
            }
        }
    }
1359112
public static void unregisterMessageHandler(Class<? extends AVIMMessage> clazz,
                                              MessageHandler<?> handler) {
    Set<MessageHandler> handlerSet = messageHandlerRepository.get(clazz);
    if (handlerSet != null) {
      handlerSet.remove(handler);
    }
  }
212893
protected void onServiceInstanceAvailable(ServiceInstance instance){
        String serviceName = instance.getServiceName();
        synchronized(notificationHandlers){
            if(notificationHandlers.containsKey(serviceName)){
                for(NotificationHandler h : notificationHandlers.get(serviceName)){
                    h.serviceInstanceAvailable(instance);
                }
            }
        }
    }
861832
public static synchronized void remove(String appname) {
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_CORE.logp(Level.FINE, methodClassName, "remove", appname);
        }
        scrSessionContexts.remove(appname);
    }
1326412
def remove_loghandler (handler):
    """"""
    logging.getLogger(LOG_ROOT).removeHandler(handler)
    logging.getLogger().removeHandler(handler)
138237
public void removeService(ServiceReference reference, Object service) {
        if (serviceRegistration != null) {
            serviceRegistration.unregister();
            serviceRegistration = null;
        }

        String alias = this.getAlias();
        ((HttpService) service).unregister(alias);
        if (servlet instanceof WebappServlet)
            ((WebappServlet)servlet).free();
        servlet = null;
    }
709324
def remove_service_listener(self, listener):
        """"""
        for browser in self.browsers:
            if browser.listener == listener:
                browser.cancel()
                del(browser)
1178022
public void unregisterServiceInstance(String serviceName, String instanceId){
        ProtocolHeader header = new ProtocolHeader();
        header.setType(ProtocolType.UnregisterServiceInstance);

        UnregisterServiceInstanceProtocol p = new UnregisterServiceInstanceProtocol(serviceName, instanceId);
        connection.submitRequest(header, p, null);
    }
1135967
public void handleServerNotificationRegistration(RESTRequest request, int clientID, ServerNotificationRegistration serverNotificationRegistration,
                                                     JSONConverter converter) {
        //Get the client area
        ClientNotificationArea clientArea = getInboxIfAvailable(clientID, converter);

        if (serverNotificationRegistration.operation == Operation.RemoveAll) {
            //Unregister with our client area (will also unregister with the MBeanServer)
            clientArea.removeServerNotificationListener(request, serverNotificationRegistration, true, converter, false);

        } else {
            if (serverNotificationRegistration.operation == Operation.Add) {
                //Register with our client area (will also register with the MBeanServer)
                clientArea.addServerNotificationListener(request, serverNotificationRegistration, converter);

                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "Added server-side notification");
                }

            } else {
                //Unregister with our client area (will also unregister with the MBeanServer)
                clientArea.removeServerNotificationListener(request, serverNotificationRegistration, false, converter, false);
            }
        }
    }
1016514
private void removeChildChangeHandler(CmsEntity child) {

        HandlerRegistration reg = m_changeHandlerRegistry.remove(child.getId());
        if (reg != null) {
            reg.removeHandler();
        }
    }
3613
public void removeCounter(String serviceName, String dataStructureName) {
        for (WanPublisherEventCounters publisherWanCounterContainer : eventCounterMap.values()) {
            publisherWanCounterContainer.removeCounter(serviceName, dataStructureName);
        }
    }
709528
@SuppressWarnings("unchecked")
    public <E> MessageHandler<? super E> removeSentMessageHandler(Class<E> type) {
        sentMessageHandlerCache.clear();
        return (MessageHandler<? super E>) sentMessageHandlers.remove(type);
    }
307009
public void deleteServerRegistrationHTTP(RESTRequest request,
                                             int clientID,
                                             ServerNotificationRegistration serverNotificationRegistration,
                                             String registrationID,
                                             JSONConverter converter) {
        //Get the client area
        ClientNotificationArea clientArea = getInboxIfAvailable(clientID, null);

        if (registrationID != null) {
            String[] artifacts = registrationID.split("_");
            int filterID = Integer.parseInt(artifacts[0]);
            int handbackID = Integer.parseInt(artifacts[1]);

            //Since this is not coming from our java client, the registration object will not have any IDs on them. So set the IDs before continuing.
            serverNotificationRegistration.filterID = filterID;
            serverNotificationRegistration.handbackID = handbackID;
        }

        clientArea.removeServerNotificationListener(request, serverNotificationRegistration, serverNotificationRegistration.operation == Operation.RemoveAll, converter,
                                                    true);
    }
773682
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");
        }
        List<InstanceChangeListener<ModelServiceInstance>> list = changeListenerMap.get(serviceName);
        if (list != null) {
            boolean found = false;
            for (InstanceChangeListener<ModelServiceInstance> listener : list) {
                if (listener instanceof NotificationHandlerAdapter
                        && ((NotificationHandlerAdapter) listener).getAdapter() == handler) {
                    list.remove(listener);
                    found = true;
                    break;
                }
            }
            if (!found) {
               LOGGER.error(ErrorCode.NOTIFICATION_HANDLER_DOES_NOT_EXIST.getMessageTemplate());
            }
        } else {
            LOGGER.error(String.format(ErrorCode.SERVICE_DOES_NOT_EXIST.getMessageTemplate(), serviceName));
        }

    }
1364690
public synchronized void removeHandler(String handlerId) {
		handlerEventMap.remove(handlerId);
		Tr.event(tc, "Removed Asynchronous Handler: " + handlerId);
		if (handlerEventMap.isEmpty()) {
			ringBuffer = null;
			Tr.event(tc, "ringBuffer for this BufferManagerImpl has now been set to null");
		}
	}
447935
public static void replaceDefaultHandler(Handler handler) {
    Logger rootlogger = LogManager.getLogManager().getLogger("");
    for(Handler h : rootlogger.getHandlers()) {
      if(h instanceof CLISmartHandler) {
        rootlogger.removeHandler(h);
      }
    }
    addHandler(handler);
  }
638404
def unregisterAPI(self, name):
        
        if name.startswith('public/'):
            target = 'public'
            name = name[len('public/'):]
        else:
            target = self.servicename
            name = name
        removes = [m for m in self.handler.handlers.keys() if m.target == target and m.name == name]
        for m in removes:
            self.handler.unregisterHandler(m)