Adds an install event listener to the listenersMap with a specified notification type

@param listener InstallEventListener to add
@param notificationType Notification type of listener
509272
public void addListener(InstallEventListener listener, String notificationType) {
        if (listener == null || notificationType == null)
            return;
        if (notificationType.isEmpty())
            return;
        if (listenersMap == null) {
            listenersMap = new HashMap<String, Collection<InstallEventListener>>();
        }
        Collection<InstallEventListener> listeners = listenersMap.get(notificationType);
        if (listeners == null) {
            listeners = new ArrayList<InstallEventListener>(1);
            listenersMap.put(notificationType, listeners);
        }
        listeners.add(listener);
    }
551647
@Override
	public void subscribeToEvent(EventListener eventListener, Class<? extends AbstractTaskEvent> eventType) {
		this.eventHandler.subscribeToEvent(eventListener, eventType);
	}
168493
@Override
	public void registerTaskEventListener(EventListener<TaskEvent> listener, Class<? extends TaskEvent> eventType) {
		taskEventHandler.subscribe(listener, eventType);
	}
607681
public void addEventListener(EventType eventType, Consumer<PrimitiveEvent> listener) {
    executor.execute(() -> eventListeners.computeIfAbsent(eventType.canonicalize(), e -> Sets.newLinkedHashSet()).add(listener));
  }
1298398
@Override
    public void register(Object listener)
    {
        if (!(listener instanceof EventListener))
        {
            throw new IllegalArgumentException("Listener must implement EventListener");
        }
        listeners.add(((EventListener) listener));
    }
865009
public void addListener(SettingsEntityListener settingsEntityListener) {
    RunAsSystemAspect.runAsSystem(
        () ->
            entityListenersService.addEntityListener(
                entityTypeId,
                new EntityListener() {
                  @Override
                  public void postUpdate(Entity entity) {
                    settingsEntityListener.postUpdate(entity);
                  }

                  @Override
                  public Object getEntityId() {
                    return getEntityType().getId();
                  }
                }));
  }
1000533
protected static void requestNotificationOnChange(JvmType type, Runnable listener) {
		Resource resource = type.eResource();
		if (resource instanceof TypeResource) {
			IMirror mirror = ((TypeResource) resource).getMirror();
			if (mirror instanceof IMirrorExtension) {
				if (((IMirrorExtension) mirror).isSealed())
					return;
			}
		}
		Notifier notifier = type;
		if (resource != null) {
			if (resource.getResourceSet() != null)
				notifier = resource.getResourceSet();
			else
				notifier = resource;
		}
		JvmTypeChangeDispatcher dispatcher = JvmTypeChangeDispatcher.findResourceChangeDispatcher(notifier);
		dispatcher.requestNotificationOnChange(type, listener);
	}
799465
@Override
    final public void addConnectionEventListener(
                                                 final ConnectionEventListener listener) {

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, "addConnectionEventListener", listener);
        }

        synchronized (_connectionListeners) {
            _connectionListeners.add(listener);
        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, "addConnectionEventListener");
        }

    }
1301737
public void subscribeToEvent(final EventListener eventListener, final Class<? extends AbstractTaskEvent> eventType) {

		synchronized (this.subscriptions) {

			List<EventListener> subscribers = this.subscriptions.get(eventType);
			if (subscribers == null) {
				subscribers = new ArrayList<EventListener>();
				this.subscriptions.put(eventType, subscribers);
			}
			subscribers.add(eventListener);
		}

	}
1004751
synchronized void addListener(final AbstractEventListener<?> listener) {
        if (null == listener) {
            throw new NullPointerException();
        }

        final String eventType = listener.getEventType();
        if (null == eventType) {
            throw new NullPointerException();
        }

        List<AbstractEventListener<?>> listenerList = listeners.get(eventType);
        if (null == listenerList) {
            listenerList = new ArrayList<>();
            listeners.put(eventType, listenerList);
        }

        listenerList.add(listener);
    }
632264
public synchronized void addEventListener(EventListener listener) throws IllegalArgumentException
    {
        if (listener instanceof ServletContextListener)
        {
            _contextListeners= LazyList.add(_contextListeners, listener);
        }
 
        super.addEventListener(listener);
    }
933402
def add_listener(self, listener_type, callback):
        
        self.listener_type= listener_type
        if listener_type == 'objectHovered':
            self.listener_callback_source_hover= callback
        elif listener_type == 'objectClicked':
            self.listener_callback_source_click= callback
        elif listener_type == 'click':
            self.listener_callback_click= callback
        elif listener_type == 'select':
            self.listener_callback_select= callback

        self.listener_flag= not self.listener_flag
809662
public synchronized void addStateListener(@Nonnull EndpointStateListener<VALUE_TYPE, ARG_TYPE> listener) throws IllegalArgumentException {
        checkListenerNonNull(listener);
        fieldStateListeners.add(listener);
        if (informStateListenerOnAdd) {
            informStateListener(getStateAndValue(), listener);
        }
    }
930881
function installEventListener(selector, type, listener)
{
  // Creates the element empty
  var element;

  // Selects, gets & stores the first DOM object matching to the selector
  element = document.querySelector(selector);

  // Installs an Event Listener on this DOM object
  element.addEventListener(type, listener);
}
99342
public void addConfigurationListener(NodeConfigListener listener) {
        StanzaListener conListener = new NodeConfigTranslator(listener);
        configEventToListenerMap.put(listener, conListener);
        pubSubManager.getConnection().addSyncStanzaListener(conListener, new EventContentFilter(EventElementType.configuration.toString()));
    }
909605
public final void addListener(
            @NonNull final Listener<DataType, KeyType, ViewType, ParamType> listener) {
        listeners.add(listener);
    }
526279
public <T> void add(Class<T> eventClass, Listener<T> listener) {
        add(eventClass, listener, HIDDEN_STATION);
    }