De-registers the trigger listener.

@param trigger Trigger to unhook from.
340117
private void unhookFromTrigger(final T trigger) {
        // Unhook from trigger
        final TriggerListener triggerAdapter = triggersToTriggerAdapters.get(trigger);
        trigger.removeTriggerListener(triggerAdapter);

        // Check if trigger was added several times
        if (!triggersToTriggerAdapters.containsKey(trigger)) {
            // All occurrences of the same trigger have been removed
            triggersToTriggerAdapters.remove(trigger);
        }
    }
156916
def remove_listener(self, listener):
        
        self.logger.debug('discarding listener %r', listener)
        with self._lock:
            self._listeners.discard(listener)
1053657
def unregister_listener(self, listener):
        
        if not isinstance(listener, IEventListener):
            raise TypeError("listener can only be an instance of type IEventListener")
        self._call("unregisterListener",
                     in_p=[listener])
805321
@Override
  public void removeListener(LifecycleListener listener)
  {
    synchronized(_lock)
    {
      if(_listeners != null && _listeners.contains(listener))
      {
        Set<LifecycleListener> listeners = new HashSet<LifecycleListener>(_listeners);
        listeners.remove(listener);

        // no more listeners... stopping the dispatcher
        if(listeners.size() == 0)
        {
          listeners = null;
          
          if(_stateChangeDispatcher != null)
          {
            _stateChangeDispatcher.end();
            _stateChangeDispatcher = null;
          }
        }

        if(listeners == null)
          _listeners = null;
        else
          _listeners = Collections.unmodifiableSet(listeners);
      }

    }
  }
242354
public final void removeChainEventListener(ChainEventListener listener) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(this, tc, "removeChainEventListener: " + listener);
        }
        if (null != listener) {
            if (!this.chainEventListeners.remove(listener)) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(this, tc, "Cannot find listener to be removed");
                }
            }
        }
    }
379589
private void hookToTrigger(final T trigger) {
        // Hook to trigger only if not already done (the same trigger adatper will be used if it was already hooked)
        if (!triggersToTriggerAdapters.containsKey(trigger)) {
            final TriggerListener triggerAdapter = new TriggerAdapter(trigger);
            triggersToTriggerAdapters.put(trigger, triggerAdapter);
            trigger.addTriggerListener(triggerAdapter);
        }
    }
1082951
protected void unregisterNotificationListeners(ClassLoaderLeakPreventor preventor, NotificationBroadcasterSupport mBean,
                                                 final Class<?> listenerWrapperClass) {
    final Field listenerListField = preventor.findField(NotificationBroadcasterSupport.class, "listenerList");
    if(listenerListField != null) {
      final Class<?> listenerInfoClass = preventor.findClass("javax.management.NotificationBroadcasterSupport$ListenerInfo");

      final List<? /*javax.management.NotificationBroadcasterSupport.ListenerInfo*/> listenerList =
          preventor.getFieldValue(listenerListField, mBean);

      if(listenerList != null) {
        final Field listenerField = preventor.findField(listenerInfoClass, "listener");
        final Field filterField = preventor.findField(listenerInfoClass, "filter");
        final Field handbackField = preventor.findField(listenerInfoClass, "handback");
        for(Object listenerInfo : listenerList) {
          final NotificationListener listener = preventor.getFieldValue(listenerField, listenerInfo);
          final NotificationListener rawListener = unwrap(preventor, listenerWrapperClass, listener);
          final NotificationFilter filter = preventor.getFieldValue(filterField, listenerInfo);
          final Object handback = preventor.getFieldValue(handbackField, listenerInfo);
          
          if(preventor.isLoadedInClassLoader(rawListener) || preventor.isLoadedInClassLoader(filter) || preventor.isLoadedInClassLoader(handback)) {
            preventor.warn(((listener == rawListener) ? "Listener '" : "Wrapped listener '") + listener + 
                "' (or its filter or handback) of MBean " + mBean + 
                " was loaded in protected ClassLoader; removing");
            // This is safe, as the implementation works with a copy, not altering the original
            try {
              mBean.removeNotificationListener(listener, filter, handback);
            }
            catch (ListenerNotFoundException e) { // Should never happen
              preventor.error(e);
            }
          }
        }
      }
    }
  }
1015820
public void setTriggers(List<Trigger> triggers) {
        this.triggers.clear();
        if (triggers != null) {
            this.triggers.addAll(triggers);
        }
    }
337039
public void removeListener(InvalidationListener listener) {
        synchronized (hsInvalidationListeners) {
            hsInvalidationListeners.remove(listener);
            invalidationListenerCount = hsInvalidationListeners.size();
            bUpdateInvalidationListener = true;
        }
    }
294213
@Override
  public void releaseAcquiredTrigger(OperableTrigger trigger) {

    synchronized (lock) {
      TriggerWrapper tw = wrappedTriggersByKey.get(trigger.getName());
      if (tw != null && tw.state == TriggerWrapper.STATE_ACQUIRED) {
        tw.state = TriggerWrapper.STATE_WAITING;
        timeWrappedTriggers.add(tw);
      }
    }
  }
949770
public void unsubscribe() {
        List<InvocationHandler> handler = this.handlers.get(target);
        if (handler != null) {
            handler.remove(this.handler);
        }
    }
1264810
public static void unregisterLogListener(@NonNull final Context context, @NonNull final DfuLogListener listener) {
		if (mLogBroadcastReceiver != null) {
			final boolean empty = mLogBroadcastReceiver.removeLogListener(listener);

			if (empty) {
				LocalBroadcastManager.getInstance(context).unregisterReceiver(mLogBroadcastReceiver);
				mLogBroadcastReceiver = null;
			}
		}
	}
411441
public void setTrigger (AbstractButton trigger,
                            Icon collapsed, Icon uncollapsed)
    {
        _trigger = trigger;
        _trigger.setHorizontalAlignment(SwingConstants.LEFT);
        _trigger.setHorizontalTextPosition(SwingConstants.RIGHT);
        _downIcon = collapsed;
        _upIcon = uncollapsed;
        _trigger.addActionListener(this);
    }
831992
protected void onUnload() {
		if (registrations != null) {
			for (HandlerRegistration registration : registrations) {
				registration.removeHandler();
			}
		}
		loadedRegistration.removeHandler();
		super.onUnload();
	}
1051758
void removeAllEventListeners() {
        for (JcrListenerAdapter adapter : this.listeners) {
            assert (adapter != null);
            this.repositoryObservable.unregister(adapter);
        }
        this.listeners.clear();
    }
275046
public void unregister(EventObserver<?> observer){
        for (Map.Entry<Class, Set<EventObserver>> entry : observers.entrySet()) {
            entry.getValue().remove(observer);
        }

    }
1270055
public static <E extends Event> void unsubscribe(Class<E> event, final Listener<E> listener) {
        getEventBus().unsubscribe(event, listener);
    }