Notify our own event listeners of a Z-Wave event.
@param event the event to send.
510089
public void notifyEventListeners(ZWaveEvent event) {
		logger.debug("Notifying event listeners");
		for (ZWaveEventListener listener : this.zwaveEventListeners) {
			logger.trace("Notifying {}", listener.toString());
			listener.ZWaveIncomingEvent(event);
		}
	}
431846
private void handleEvent(PrimitiveEvent event) {
    log.trace("Received {}", event);
    Set<Consumer<PrimitiveEvent>> listeners = eventListeners.get(event.type());
    if (listeners != null) {
      listeners.forEach(l -> l.accept(event));
    }
  }
458218
private void notifyListener(GerritEventListener listener, GerritEvent event) {
        logger.trace("Notifying listener {} of event {}", listener, event);
        try {
            logger.trace("Reflecting closest method");
            Method method = listener.getClass().getMethod("gerritEvent", event.getClass());
            method.invoke(listener, event);
        } catch (IllegalAccessException ex) {
            logger.debug("Not allowed to invoke the reflected method. Calling default.", ex);
            listener.gerritEvent(event);
        } catch (IllegalArgumentException ex) {
            logger.debug("Not allowed to invoke the reflected method with specified parameter (REFLECTION BUG). "
               + "Calling default.", ex);
            listener.gerritEvent(event);
        } catch (InvocationTargetException ex) {
            logger.error("When notifying listener: {} about event: {}", listener, event);
            logger.error("Exception thrown during event handling.", ex);
        } catch (NoSuchMethodException ex) {
            logger.debug("No apropriate method found during reflection. Calling default.", ex);
            listener.gerritEvent(event);
        } catch (SecurityException ex) {
            logger.debug("Not allowed to reflect/invoke a method on this listener (DESIGN BUG). Calling default", ex);
            listener.gerritEvent(event);
        }
    }
275138
public void notifyListeners (DEvent event)
    {
        if (_listeners == null) {
            return;
        }

        for (int ii = 0, ll = _listeners.length; ii < ll; ii++) {
            Object listener = _listeners[ii];
            if (listener == null) {
                continue;
            }
            if (listener instanceof WeakReference<?>) {
                if ((listener = ((WeakReference<?>)listener).get()) == null) {
                    _listeners[ii] = null;
                    continue;
                }
            }

            try {
                // do any event specific notifications
                event.notifyListener(listener);

                // and notify them if they are listening for all events
                if (listener instanceof EventListener) {
                    ((EventListener)listener).eventReceived(event);
                }

            } catch (Exception e) {
                log.warning("Listener choked during notification", "list", listener,
                            "event", event, e);
            }
        }
    }
919613
@Override
    public void send(Event event) {
        if (!closed) {
            executorService.execute(new EventSubmitter(event, MDC.getCopyOfContextMap()));
        }
    }
10605
public void fire(StepStartedEvent event) {
        Step step = new Step();
        event.process(step);
        stepStorage.put(step);

        notifier.fire(event);
    }
1065409
public void dispatchEvent(IEvent event) {
        for (IEventListener listener : listeners) {
            if (event.getSource() == null || event.getSource() != listener) {
                listener.notifyEvent(event);
            }
        }
    }
808751
synchronized void fireEvent(final Event<?> event) {
        final String eventType = event.getType();
        List<Event<?>> events = synchronizedEvents.get(eventType);
        if (null == events) {
            events = new ArrayList<>();
            synchronizedEvents.put(eventType, events);
        }

        events.add(event);
        setChanged();
        notifyListeners(event);
    }
954681
public static <T> Listener<T> createListenerToFire(Event<T> event) {
		return new Listener<T>() {
			@Override
			public void fire(T obj) {
				event.fire(obj);
			}
		};
	}
611397
protected void sendEvent(final T event) {
        if (isStatic) {
            sendEvent(event, null, null);
        } else {
            CreationalContext<X> creationalContext = null;
            try {
                Object receiver = getReceiverIfExists(null);
                if (receiver == null && reception != Reception.IF_EXISTS) {
                    // creational context is created only if we need it for obtaining receiver
                    // ObserverInvocationStrategy takes care of creating CC for parameters, if needed
                    creationalContext = beanManager.createCreationalContext(declaringBean);
                    receiver = getReceiverIfExists(creationalContext);
                }
                if (receiver != null) {
                    sendEvent(event, receiver, creationalContext);
                }
            } finally {
                if (creationalContext != null) {
                    creationalContext.release();
                }
            }
        }
    }
9832
function addEventListener (event, listener) {
    if (hasDOM()) {
      eventEmitter.addEventListener(event, listener);
    } else if (hasEventEmitter()) {
      eventEmitter.on(event, listener);
    }
  }
431213
public synchronized void fireEvent(Event evt) {
		if (evt == null) {
			return;
		}

		// Process global listeners
		for (Enumeration<EventListener> keys = globalListeners.elements(); keys
				.hasMoreElements();) {
			EventListener mListener = keys.nextElement();
			try {
				mListener.processEvent(evt);
			} catch (Throwable t) {
			}
		}

		String sourceThread = Thread.currentThread().getName();

		for (Enumeration<String> keys = keyedListeners.keys(); keys
				.hasMoreElements();) {
			String key = (String) keys.nextElement();
			// We don't want badly behaved listeners to throw uncaught
			// exceptions and upset other listeners
			try {
				String prefix = "";
				if (sourceThread.indexOf('-') > -1) {
					prefix = sourceThread.substring(0,
							sourceThread.indexOf('-'));

					if (key.startsWith(prefix)) {
						EventListener mListener = keyedListeners.get(key);
						mListener.processEvent(evt);
					}
				}

			} catch (Throwable thr) {
				// log.error("Event failed.", thr);
			}
		}
	}
163039
public void eventReceived (DEvent event)
    {
        log.debug("Event received", "event", event);

        if (event instanceof InvocationRequestEvent) {
            InvocationRequestEvent ire = (InvocationRequestEvent)event;
            dispatchRequest(ire.getSourceOid(), ire.getInvCode(),
                            ire.getMethodId(), ire.getArgs(), ire.getTransport());
        }
    }
1135054
public final ZMonitor add(Event... events)
    {
        if (started) {
            System.out.println("ZMonitor: Unable to add events while already started.");
            return this;
        }
        ZMsg msg = new ZMsg();
        msg.add(ADD_EVENTS);
        for (Event evt : events) {
            msg.add(evt.name());
        }
        agent.send(msg);
        agent.recv();
        return this;
    }
546904
private void onMessageDelivered(MessageDeliveredEvent event) {
        handler.post(() -> listener.onMessageDelivered(event));
        log("Event published " + event.toString());
    }
1330576
public function notify($event = null)
    {
        /* @var Doozr_Base_Crud_Interface $observer */
        foreach ($this->observer as $observer) {
            $observer->update($this, $event);
        }

        $this->clear();
    }
329031
void notifyListener() {
        Node<K, V> node;
        while ((node = pendingNotifications.poll()) != null) {
            listener.onEviction(node.key, node.getValue());
        }
    }