Get all listeners of a particular type of event.
184950
def get_listeners(self, event_type: str) -> List[Callable]:
        """"""
        if event_type not in self.events:
            raise ValueError(f'No event {event_type} in system.')
        return self.events.get_listeners(event_type)
175782
function onListeners($this, eventsInput, callback, context, type)
  {
    if ( !isFunction( callback ) )
    {
      return noop;
    }

    var callbackContext = context || $this;
    var events = toArray( eventsInput, ' ' );
    var listeners = $this.$$on;

    if ( !listeners )
    {
      Class.prop( $this, '$$on', listeners = {} );
    }

    var nodes = [];

    for (var i = 0; i < events.length; i++)
    {
      var eventName = events[ i ];
      var eventListeners = listeners[ eventName ];

      if ( !eventListeners )
      {
        eventListeners = listeners[ eventName ] = new EventNode();
      }

      nodes.push( new EventNode( eventListeners, callback, callbackContext, type, triggerId ) );
    }

    return function ignore()
    {
      for (var i = 0; i < nodes.length; i++)
      {
        nodes[ i ].remove();
      }

      nodes.length = 0;
    };
  }
59225
def notify_listeners(self, msg_type, params):
        """"""
        for c in self.listeners:
            c.notify(msg_type, params)
1279516
public final synchronized L[] getListeners() {
        if (this.map == null) {
            return newArray(0);
        }
        List<L> list = new ArrayList<>();

        L[] listeners = this.map.get(null);
        if (listeners != null) {
            for (L listener : listeners) {
                list.add(listener);
            }
        }
        for (Entry<String, L[]> entry : this.map.entrySet()) {
            String name = entry.getKey();
            if (name != null) {
                for (L listener : entry.getValue()) {
                    list.add(newProxy(name, listener));
                }
            }
        }
        return list.toArray(newArray(list.size()));
    }
217054
public function getListeners($event = null){
        if (!$event){
            return $this->listeners;
        }
        return isset($this->listeners[$event]) ? $this->listeners[$event] : null;
    }
305220
def remove_all_listeners(self, event=None):
        
        if event is not None:
            self._events[event] = OrderedDict()
        else:
            self._events = defaultdict(OrderedDict)
957085
def _find_listeners():
    
    for i in range(31):
        try:
            if gpib.listener(BOARD, i) and gpib.ask(BOARD, 1) != i:
                yield i
        except gpib.GpibError as e:
            logger.debug("GPIB error in _find_listeners(): %s", repr(e))
248153
def observe_all(self, callback: Callable[[str, Any, Any], None]):
        """"""
        self._all_callbacks.append(callback)
851548
def _create_event_listeners(self):
        """"""
        LOG.debug("Create the event listeners.")
        for event_type, callback in self._event_callback_pairs:
            LOG.debug("Create listener for %r event", event_type)
            listener = self._utils.get_vnic_event_listener(event_type)
            eventlet.spawn_n(listener, callback)
1277742
function(eventType, listener) {
    var i, len, foundIndex, events, perEventHandlers;
    if (arguments.length === 0) {
      events = _keys(_handlers);
    } else if (typeof eventType === "string" && eventType) {
      events = eventType.toLowerCase().split(/\s+/);
    } else if (typeof eventType === "object" && eventType && !("length" in eventType) && typeof listener === "undefined") {
      _keys(eventType).forEach(function(key) {
        var listener = eventType[key];
        if (typeof listener === "function") {
          ZeroClipboard.off(key, listener);
        }
      });
    }
    if (events && events.length) {
      for (i = 0, len = events.length; i < len; i++) {
        eventType = events[i].replace(/^on/, "");
        perEventHandlers = _handlers[eventType];
        if (perEventHandlers && perEventHandlers.length) {
          if (listener) {
            foundIndex = perEventHandlers.indexOf(listener);
            while (foundIndex !== -1) {
              perEventHandlers.splice(foundIndex, 1);
              foundIndex = perEventHandlers.indexOf(listener, foundIndex);
            }
          } else {
            perEventHandlers.length = 0;
          }
        }
      }
    }
    return ZeroClipboard;
  }
1117864
function getListeners(element) {
        var id = idHandler.get(element);

        if (id === undefined) {
            return [];
        }

        return eventListeners[id] || [];
    }
1343409
def num_listeners(self, event=None):
        
        if event is not None:
            return len(self._listeners[event])
        else:
            return sum(len(l) for l in self._listeners.values())
1140432
function filterListeners (listenerCollection) {
        return function(filters) {
            var handlers = [];

            _.each(listenerCollection, function(listener){
                handlers = handlers.concat( findMatch(filters, listener) );
            });

            return handlers;
        };
    }
777993
def get_emitter(self, event_type: str) -> Callable:
        """"""
        if event_type not in self.events:
            raise ValueError(f'No event {event_type} in system.')
        return self.events.get_emitter(event_type)
918831
def validate_listeners(self):
        """"""

        if self.exception:
            # pylint: disable=raising-bad-type
            raise self.exception

        listeners = self.__listeners_for_thread
        if not sum(len(l) for l in listeners):
            raise ValueError("No active listeners")
367918
public List<ListenerType<WebFragmentDescriptor>> getAllListener()
   {
      List<ListenerType<WebFragmentDescriptor>> list = new ArrayList<ListenerType<WebFragmentDescriptor>>();
      List<Node> nodeList = model.get("listener");
      for(Node node: nodeList)
      {
         ListenerType<WebFragmentDescriptor>  type = new ListenerTypeImpl<WebFragmentDescriptor>(this, "listener", model, node);
         list.add(type);
      }
      return list;
   }
1267919
def get_events(self):
        '''
        
        '''
        ret = []
        while True:
            event = self.event.get_event(wait=1, full=True)
            if event is None:
                return ret
            ret.append(event)