Register a listener to receive a callback when the selected VI is
connected.

@param listener The listener that should receive the callback.
512401
public void addOnVehicleInterfaceConnectedListener(
            ViConnectionListener listener) throws VehicleServiceException {
        if(mRemoteService != null) {
            try {
                mRemoteService.addViConnectionListener(listener);
            } catch(RemoteException e) {
                throw new VehicleServiceException(
                        "Unable to add connection status listener", e);
            }
        }
    }
1346724
public void addLoginListener(LoginListener listener){
        logger.debug("addLoginListener");
        Subscription subscription = loginEventPublisher
                .subscribeOn(config.subscribeOn())
                .observeOn(config.observeOn())
                .subscribe(listener);
        listener.setSubscription(subscription);
    }
756460
public void unregisterListener(IPluginEventListener listener) {
        if (pluginEventListeners2 != null && pluginEventListeners2.contains(listener)) {
            pluginEventListeners2.remove(listener);
            listener.onPluginEvent(new PluginEvent(this, PluginAction.UNSUBSCRIBE));
        }
    }
130771
protected final <T extends EventListener> void addListener(Class<T> listenerType, T listener) {
		if (this.listeners == null) {
			this.listeners = new ListenerCollection<>();
		}
		this.listeners.add(listenerType, listener);
	}
310156
public void addSipApplicationListener(String listener) {
    	if(logger.isDebugEnabled()) {
			logger.debug("addSipApplicationListener " + getName());
		}

    	sipApplicationListeners.add(listener);
    	fireContainerEvent("addSipApplicationListener", listener);

        // FIXME - add instance if already started?

    }
836496
public void addListener(ILabelProviderListener listener)
	{
		if (fLabelDecorators != null)
		{
			for (int i = 0; i < fLabelDecorators.size(); i++)
			{
				ILabelDecorator decorator = (ILabelDecorator) fLabelDecorators.get(i);
				decorator.addListener(listener);
			}
		}
		fListeners.add(listener);
	}
138425
public void addListener(final NodeTypeManagerListener listener)
   {
      if (!this.listeners.containsKey(listener))
      {
         this.listeners.put(listener, listener);
      }
   }
1072100
public void addConnectionListener(KNXListener l)
	{
		if (l == null)
			return;
		synchronized (listeners) {
			if (!listeners.contains(l)) {
				listeners.add(l);
				listenersCopy = new ArrayList(listeners);
			}
			else
				logger.warn("event listener already registered");
		}
	}
941163
public void addListener(TransactionableResourceManagerListener listener)
   {
      TransactionContext ctx = contexts.get();
      if (ctx == null)
      {
         throw new IllegalStateException("There is no active transaction context");
      }
      XidContext xidCtx = ctx.getXidContext();
      if (xidCtx == null)
      {
         throw new IllegalStateException("There is no active xid context");
      }
      xidCtx.addListener(listener);
   }
381946
public void addListener(AnimatorListener listener) {
        if (mListeners == null) {
            mListeners = new ArrayList<AnimatorListener>();
        }
        mListeners.add(listener);
    }
1294927
public void registerListener(JobID jobId, KvStateRegistryListener listener) {
		final KvStateRegistryListener previousValue = listeners.putIfAbsent(jobId, listener);

		if (previousValue != null) {
			throw new IllegalStateException("Listener already registered under " + jobId + '.');
		}
	}
1154826
public void removeListener(ILabelProviderListener listener)
	{
		if (fListeners != null)
		{
			fListeners.remove(listener);
			if (fListeners.isEmpty() && fProblemChangedListener != null)
			{
				VdmUIPlugin.getDefault()
						.getProblemMarkerManager()
						.removeListener(fProblemChangedListener);
				fProblemChangedListener = null;
			}
		}
	}
749871
public final synchronized void addListener(EventListener l) {
        if(l ==null) {
            throw new IllegalArgumentException("Listener " + l +
                                               " is null");
        }
        if(listeners == EMPTY_LISTENERS) {
            listeners = new EventListener[1];
            listeners[0] = l;
        }
        else {
            int i = listeners.length;
            EventListener[] tmp = new EventListener[i+1];
            System.arraycopy(listeners, 0, tmp, 0, i);

            tmp[i] = l;
            listeners = tmp;
        }
    }
1321284
@Override
    public void addConnectionListener(SICoreConnectionListener listener)
                    throws SIConnectionDroppedException,
                    SIConnectionUnavailableException {

        checkValid();

        _delegateConnection.addConnectionListener(listener);

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

    }
594422
@Override
    public void registerListener(IServletContext isc, AsyncContextImpl ac) {
        Object obj = isc.getAttribute(AbstractInitialListenerRegistration.WELD_INITIAL_LISTENER_ATTRIBUTE);
        if (obj != null) {
            ServletRequestListener wl = (ServletRequestListener) obj;
            WeldTerminalAsyncListener asyncListener = new WeldTerminalAsyncListener(wl, isc);
            ac.addListener(asyncListener, ac.getIExtendedRequest(), ac.getIExtendedResponse());
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                Tr.debug(tc, "added WeldInitialAsyncListener to the asyncContext");
        }
    }
921150
public void addConnectedEventListener(Executor executor, PeerConnectedEventListener listener) {
        peerConnectedEventListeners.add(new ListenerRegistration<>(checkNotNull(listener), executor));
        for (Peer peer : getConnectedPeers())
            peer.addConnectedEventListener(executor, listener);
        for (Peer peer : getPendingPeers())
            peer.addConnectedEventListener(executor, listener);
    }