Fires the given event to all registered listeners
343444
public void fireTagParseEvent(TagParseEvent tpe)
	{
		for (int i = 0; i < tagParseListeners.size(); i++)
		{
			TagParseListener l = tagParseListeners.get(i);
			l.tagParsed(tpe);
		}
	}
657543
function globalEventHandler(event) {
    if (listeners[event.type]) {
      listeners[event.type].forEach(function(currentHandler) {
        currentHandler.call(this, event);
      }, this);
    }
  }
907075
function emit(event /* , args... */) {
  this._events = this._events || {};
  // NOTE: copy array so that removing listeners in listeners (once etc)
  // NOTE: does not affect the iteration
  var list = (this._events[event] || []).slice(0);
  for(var i = 0; i < list.length; i++) {
    list[i].apply(this, Array.prototype.slice.call(arguments, 1))
  }
  return list.length > 0;
}
372186
protected function fire($listeners, $event): void
    {
        ksort($listeners);
        foreach ($listeners as $list) {
            foreach ($list as $listener) {
                $result = $listener($event);
                if (null === $result) {
                    // continue;
                } elseif (false === $result) {
                    break 2;
                } else {
                    $event->setTarget($result);
                }
            }
        }
    }
330788
protected void fireActionPerformed(ActionEvent event) {
    Object[] listeners = listenerList.getListenerList();
    for(int i = listeners.length - 2; i >= 0; i -= 2) {
      if(listeners[i] == ActionListener.class) {
        ((ActionListener) listeners[i + 1]).actionPerformed(event);
      }
    }
  }
1016095
public void trigger(Object event){

        Set<Class> eventTypes = getAllInheritedClasses(event.getClass());

        for (Class eventType : eventTypes) {
            if(observers.containsKey(eventType)){
                for (EventObserver eventObserver : observers.get(eventType)) {
                    executionQueue.get().add(new EventExecution(event, eventObserver));
                }
            }
        }

        triggerQueue();
    }
1301148
private void fireEvent(int eventType, Object eventObject) {
        AgentRosterListener[] listeners;
        synchronized (this.listeners) {
            listeners = new AgentRosterListener[this.listeners.size()];
            this.listeners.toArray(listeners);
        }
        for (int i = 0; i < listeners.length; i++) {
            switch (eventType) {
                case EVENT_AGENT_ADDED:
                    listeners[i].agentAdded((EntityBareJid) eventObject);
                    break;
                case EVENT_AGENT_REMOVED:
                    listeners[i].agentRemoved((EntityBareJid) eventObject);
                    break;
                case EVENT_PRESENCE_CHANGED:
                    listeners[i].presenceChanged((Presence) eventObject);
                    break;
            }
        }
    }
601638
private void fireUpdated(Object source) {
		for (int i=0;i<listeners.size();i++) {
			((InputPanelListener) listeners.get(i)).valueUpdated(this);
		}
	}
1297686
protected void fireTriggerEvent(TriggerEvent event) {
        try {
            for (TriggerListener listener : listeners) {
                listener.triggerValidation(event);
            }
        } catch (RuntimeException e) {
            uncheckedExceptionHandler.handleException(e);
        } catch (Error e) {
            uncheckedExceptionHandler.handleError(e);
        }
    }
578816
public void fire(EventDefinition eventDefinition, Event eventDetails) {
        if (eventDefinition.getType() == EventDefinition.TYPE_POST) {
            fire(listenersPost, eventDefinition, eventDetails);
        } else {
            fire(listeners, eventDefinition, eventDetails);
        }
    }
781258
def fire_bundle_event(self, event):
        
        with self.__bnd_lock:
            # Copy the list of listeners
            listeners = self.__bnd_listeners[:]

        # Call'em all
        for listener in listeners:
            try:
                listener.bundle_changed(event)
            except:
                self._logger.exception("Error calling a bundle listener")
691750
private void fireEvent(RecorderEventImpl event) {
        eventSender.event = event;
        scheduler.submit(eventSender, PriorityQueueScheduler.INPUT_QUEUE);
    }
411647
def _send_event_to_all(self, action, event):
        
        for project_listeners in self._listeners.values():
            for listener in project_listeners:
                listener.put_nowait((action, event, {}))
819937
protected void fireChangeListeners() {
        ChangeEvent ev = new ChangeEvent(this);
        Object[] l = listeners.getListeners(ChangeListener.class);
        for (Object listener : l) {
            ((ChangeListener) listener).stateChanged(ev);
        }
    }
327252
protected void fireEventHandler(List<I_CmsEventListener> listeners, CmsEvent event) {

        if (!LOG.isDebugEnabled()) {
            // no logging required
            if ((listeners != null) && (listeners.size() > 0)) {
                // handle all event listeners that listen to this event type
                I_CmsEventListener[] list = listeners.toArray(EVENT_LIST);
                // loop through all registered event listeners
                for (int i = 0; i < list.length; i++) {
                    try {
                        // fire the event
                        list[i].cmsEvent(event);
                    } catch (Throwable t) {
                        LOG.error(
                            Messages.get().getBundle().key(
                                Messages.ERR_CALLING_EVENT_LISTENER_FAILED_2,
                                list[i].getClass().getName(),
                                event.toString()),
                            t);
                    }
                }
            }
        } else {
            // add lots of event debug output (this should usually be disabled)
            // repeat event handling code to avoid multiple "is log enabled" checks in normal operation
            LOG.debug(Messages.get().getBundle().key(Messages.LOG_DEBUG_EVENT_1, event.toString()));
            if ((listeners != null) && (listeners.size() > 0)) {
                // handle all event listeners that listen to this event type
                I_CmsEventListener[] list = listeners.toArray(EVENT_LIST);
                // log the event data
                if (event.getData() != null) {
                    Iterator<String> i = event.getData().keySet().iterator();
                    while (i.hasNext()) {
                        String key = i.next();
                        Object value = event.getData().get(key);
                        LOG.debug(
                            Messages.get().getBundle().key(
                                Messages.LOG_DEBUG_EVENT_VALUE_3,
                                key,
                                value,
                                event.toString()));
                    }
                } else {
                    LOG.debug(Messages.get().getBundle().key(Messages.LOG_DEBUG_NO_EVENT_VALUE_1, event.toString()));
                }
                // log all the registered event listeners
                for (int j = 0; j < list.length; j++) {
                    LOG.debug(
                        Messages.get().getBundle().key(
                            Messages.LOG_DEBUG_EVENT_LISTENERS_3,
                            list[j],
                            new Integer(j),
                            event.toString()));
                }
                // loop through all registered event listeners
                for (int i = 0; i < list.length; i++) {
                    LOG.debug(
                        Messages.get().getBundle().key(
                            Messages.LOG_DEBUG_EVENT_START_LISTENER_3,
                            list[i],
                            new Integer(i),
                            event.toString()));
                    try {
                        // fire the event
                        list[i].cmsEvent(event);
                    } catch (Throwable t) {
                        LOG.error(
                            Messages.get().getBundle().key(
                                Messages.ERR_CALLING_EVENT_LISTENER_FAILED_2,
                                list[i].getClass().getName(),
                                event.toString()),
                            t);
                    }
                    LOG.debug(
                        Messages.get().getBundle().key(
                            Messages.LOG_DEBUG_EVENT_END_LISTENER_3,
                            list[i],
                            new Integer(i),
                            event.toString()));
                }
            } else {
                LOG.debug(Messages.get().getBundle().key(Messages.LOG_DEBUG_EVENT_NO_LISTENER_1, event.toString()));
            }
            LOG.debug(Messages.get().getBundle().key(Messages.LOG_DEBUG_EVENT_COMPLETE_1, event.toString()));
        }
    }
21069
public static void fireOnDeleted(@Nonnull Node node) {
        for (NodeListener nl: all()) {
            try {
                nl.onDeleted(node);
            } catch (Throwable ex) {
                LOGGER.log(Level.WARNING, "Listener invocation failed", ex);
            }
        }
    }
667710
public static void fireSREChanged(PropertyChangeEvent event) {
		for (final Object listener : SRE_LISTENERS.getListeners()) {
			((ISREInstallChangedListener) listener).sreChanged(event);
		}
	}