Register an {@link ResponseListener} to notify when {@link Response}s are added

@param listener the {@link ResponseListener} to register
6975
public void registerListener(ResponseListener listener) {
		if (! listeners.contains(listener)) {
			boolean unique = true;
			
			for (ResponseListener existing : listeners) {
				if (existing.getClass().equals(listener.getClass())) {
					unique = false;
					break;
				}
			}
			
			if (unique) {
				listeners.add(listener);
			}
		}
	}
1083898
public LowLevelResultListener<R> registerLowLevelResultListener(LowLevelResultListener<R> listener) {
        LowLevelResultListener<R> prev = this.listener;
        if (listener == null)
            this.listener = LowLevelResultListener.none();
        else
            this.listener = listener;
        return prev;
    }
909605
public final void addListener(
            @NonNull final Listener<DataType, KeyType, ViewType, ParamType> listener) {
        listeners.add(listener);
    }
477379
@Override
    public void addEventListener(EventListener listener) {
        if (listener instanceof SessionListener) {
            sessionListeners.add((SessionListener)listener);
        }
        if (listener instanceof SessionAttributeListener) {
            sessionAttributeListeners.add((SessionAttributeListener)listener);
        }
    }
621375
synchronized public void removeListener(Object listener)
    {
        if (!_listeners.contains(listener))
            throw new IllegalStateException("Invalid listener, not currently registered");

        _listeners.remove(listener);
    }
1322123
public final void setListener( @Nullable final WebSocketListener listener )
  {
    _listener = null == listener ? NullWebSocketListener.LISTENER : listener;
  }
1188667
protected Future<T> addToListeners(
    final GenericCompletionListener<? extends Future<T>> listener) {
    if (listener == null) {
      throw new IllegalArgumentException("The listener can't be null.");
    }

    synchronized(this) {
      listeners.add(listener);
    }

    if(isDone()) {
      notifyListeners();
    }

    return this;
  }
130724
public void doAddListener(BaseListener listener)
    {
        if (m_nextListener != null)
            m_nextListener.doAddListener(listener);
        else
            m_nextListener = listener;
    }
646734
public void addBOSHClientRequestListener(
            final BOSHClientRequestListener listener) {
        if (listener == null) {
            throw(new IllegalArgumentException(NULL_LISTENER));
        }
        requestListeners.add(listener);
    }
487589
public RadioBoxList<V> addListener(Listener listener) {
        if(listener != null && !listeners.contains(listener)) {
            listeners.add(listener);
        }
        return this;
    }
1346724
public void addLoginListener(LoginListener listener){
        logger.debug("addLoginListener");
        Subscription subscription = loginEventPublisher
                .subscribeOn(config.subscribeOn())
                .observeOn(config.observeOn())
                .subscribe(listener);
        listener.setSubscription(subscription);
    }
1233176
public ListenerRegistration<RuleLifecycleListener> addLifecycleListener(final RuleLifecycleListener listener)
    {
        this.listeners.add(listener);
        return new ListenerRegistration<RuleLifecycleListener>()
        {
            @Override
            public RuleLifecycleListener removeListener()
            {
                listeners.remove(listener);
                return listener;
            }
        };

    }
1092714
public void setListener(Listener listener) {
        if (null != listener) {
            listenerReference = new WeakReference<Listener>(listener);
        } else {
            listenerReference = null;
        }
    }
1346315
public void addListener(LifecycleListener listener)
  {
    synchronized (this) {
      if (isDestroyed()) {
        IllegalStateException e = new IllegalStateException("attempted to add listener to a destroyed lifecyle " + this);

        if (_log != null)
          _log.log(Level.WARNING, e.toString(), e);
        else
          Logger.getLogger(Lifecycle.class.getName()).log(Level.WARNING, e.toString(), e);

        return;
      }

      if (_listeners == null)
        _listeners = new ArrayList<WeakReference<LifecycleListener>>();

      for (int i = _listeners.size() - 1; i >= 0; i--) {
        LifecycleListener oldListener = _listeners.get(i).get();

        if (listener == oldListener)
          return;
        else if (oldListener == null)
          _listeners.remove(i);
      }

      _listeners.add(new WeakReference<LifecycleListener>(listener));
    }
  }
969438
public synchronized void addListener(AuthListener listener) {
        if (getListeners().contains(listener)){
            return;
        }
        mListeners.add(new WeakReference<>(listener));
    }
991479
synchronized void addProbesByListener(ProbeListener listener, Collection<ProbeImpl> probes) {
        Set<ProbeImpl> listenerProbes = probesByListener.get(listener);
        if (listenerProbes == null) {
            listenerProbes = new HashSet<ProbeImpl>();
            probesByListener.put(listener, listenerProbes);
        }
        listenerProbes.addAll(probes);
    }
96462
public void addListener(ISUPListener listener) {
        if (listener == null) {
            throw new NullPointerException("Listener must not be null!");
        }
        if (this.listeners.contains(listener)) {
            throw new IllegalArgumentException("Listener already present: " + listener + " !");
        } else {
            this.listeners.add(listener);
        }

    }