public void remove(EventListener<T> eventListener) {

        if (eventListener.subscriber()) {
            logger.info("remove subscription to channel {} from {} ", name, eventListener);
            listeners.remove(eventListener);
            stats.recordLevel(eventBusName + "::" + name, listeners.size());
        } else {

            if (consumer == eventListener) {
                logger.info("remove consumer to channel {} from {} ", name, eventListener);
                consumer = new NoOpEventConsumer<>();
            }
        }
    }
public void remove(EventListener<T> eventListener) {

        if (eventListener.subscriber()) {
            logger.info("remove subscription to channel {} from {} ", name, eventListener);
            listeners.remove(eventListener);
            stats.recordLevel(eventBusName + "::" + name, listeners.size());
        } else {

            if (consumer == eventListener) {
                logger.info("remove consumer to channel {} from {} ", name, eventListener);
                consumer = new NoOpEventConsumer<>();
            }
        }
    }
public void remove ( EventListener < T > eventListener ) { if ( eventListener . subscriber ( ) ) { logger . info ( "remove subscription to channel {} from {} " , name , eventListener ) ; listeners . remove ( eventListener ) ; stats . recordLevel ( eventBusName + "::" + name , listeners . size ( ) ) ; } else { if ( consumer == eventListener ) { logger . info ( "remove consumer to channel {} from {} " , name , eventListener ) ; consumer = new NoOpEventConsumer <> ( ) ; } } }
Remove an event listener from the channel.
<p>
There can only be one consumer and many listeners.

@param eventListener eventListener
Remove an event listener from the channel . <p > There can only be one consumer and many listeners .