Sends the appropriate {@link PlaylistChangeEvent} to all registered
{@link PlaylistChangeListener}.

@param event the {@link PlaylistChangeEvent.Event} to send
963817
protected synchronized void firePlaylistChangeEvent(PlaylistChangeEvent.Event event) {
        PlaylistChangeEvent pce = new PlaylistChangeEvent(this, event);

        for (PlaylistChangeListener pcl : listeners) {
            pcl.playlistChanged(pce);
        }
    }
1029427
public void fireEvent(final Event<?> event)
    {
        Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
            @Override
            public void execute() {
                bus.fireEventFromSource(event, dialog.getInterfaceModel().getId());
            }
        });

    }
134349
public synchronized void fire(T event) {
		if (occured) throw new IllegalStateException("SingleEvent already fired");
		occured = true;
		data = event;
		if (listeners != null) {
			for (Listener<T> listener : listeners)
				listener.fire(event);
			listeners = null;
		}
		if (listenersRunnable != null) {
			for (Runnable listener : listenersRunnable)
				listener.run();
			listenersRunnable = null;
		}
	}
174986
@Override
    public synchronized void dispatch(@NonNull Event event) {
        String type = event.type;
        List<EventHandlerWrapper> eventHandlers = subscribers.get(type);
        if (eventHandlers != null) {
            EventHandlerWrapper handler = null;
            for (int i = 0, size = eventHandlers.size(); i < size; i++) {
                handler = eventHandlers.get(i);
                if (handler.eventHandlerReceiver != null) {
                    handler.handleEvent(event);
                } else {
                    if (!TextUtils.isEmpty(handler.producer) && handler.producer.equals(event.sourceId)
                            || TextUtils.isEmpty(handler.producer)) {
                        handler.handleEvent(event);
                    }
                }
            }
        }
    }
968173
@SuppressWarnings("unchecked")
  public Listener<Void> onEvent(String event, Runnable callback) {
    return onEvent(event, v -> callback.run());
  }
644816
protected void fireLabelProviderChanged(
			final LabelProviderChangedEvent event)
	{
		Object[] listeners = fListeners.getListeners();
		for (int i = 0; i < listeners.length; ++i)
		{
			final ILabelProviderListener l = (ILabelProviderListener) listeners[i];
			SafeRunner.run(new SafeRunnable()
			{
				public void run()
				{
					l.labelProviderChanged(event);
				}
			});
		}
	}
467222
public void addlistener(final ChangeListener listener) {
        synchronized (LISTENER_LOCK) {
            if (listeners.contains(listener)) {
                LOGGER.warn("Skip listener registration. listener[" + listener + "] is already registered!");
                return;
            }
            listeners.add(listener);
        }
    }
286648
public void update(MsNotifyEvent event) {
		logger.info("resource updated : event FQN " + event.getEventID().getFqn());
		if(session != null && link != null && event.getEventID().equals(MsAnnouncement.COMPLETED)) {						
			try {
				SipServletRequest byeRequest = session.createRequest("BYE");				
				byeRequest.send();																	
			} catch (IOException e) {
				logger.error("Unexpected error while sending the BYE request", e);				
			}
			link.release();			
		}
	}
1309016
@Override
    public void eventFired(EventModel event) {
        if (event.containsDescriptor(SoundIDs.StartRequest.descriptor)) {
            Identification identification = event.getListResourceContainer().provideResource("izou.common.resource.selector").stream()
                    .map(ResourceModel::getResource)
                    .filter(resource -> resource instanceof Identification)
                    .map(resource -> (Identification) resource)
                    .findFirst()
                    .orElseGet(event::getSource);

            AddOnModel addonModel = getMain().getAddOnInformationManager().getAddonModel(identification);

            if (addonModel != null) {
                requestPermanent(addonModel,
                        event.getSource(), event.containsDescriptor(SoundIDs.StartEvent.isUsingNonJava));
            }

        } else if (event.containsDescriptor(SoundIDs.StartEvent.descriptor)) {
            checkAndUpdateIdentification(event.getSource());
        } else {
            Identification identification = event.getListResourceContainer().provideResource("izou.common.resource.selector").stream()
                    .map(ResourceModel::getResource)
                    .filter(resource -> resource instanceof Identification)
                    .map(resource -> (Identification) resource)
                    .findFirst()
                    .orElseGet(event::getSource);
            AddOnModel addonModel = getMain().getAddOnInformationManager().getAddonModel(identification);
            if (addonModel != null) {
                endPermanent(addonModel);
            }
        }
    }
685840
public void fireChangeEvent() {
    ChangeEvent event = createChangeEvent(getSource());

    for (ChangeListener listener : this) {
      listener.stateChanged(event);
    }
  }
688784
private void sendEvents(final List<Event> events) {
        if (null != handlers) {
            for (EventHandler current : handlers) {
                for (Event event : events) {
                    current.handleEvent(event);
                }
            }
        }

        LOG.info("Put events(" + events.size() + ") to Monitoring Server.");

        try {
            if (sendToEventadmin) {
                EventAdminPublisher.publish(events);
            } else {
                monitoringServiceClient.putEvents(events);
            }
        } catch (MonitoringException e) {
            throw e;
        } catch (Exception e) {
            throw new MonitoringException("002",
                                          "Unknown error while execute put events to Monitoring Server", e);
        }

    }
24021
public void registerListener(IPluginEvent listener) {
        if (pluginEventListeners1 == null) {
            pluginEventListeners1 = new ArrayList<>();
        }

        if (!pluginEventListeners1.contains(listener)) {
            pluginEventListeners1.add(listener);
        }
    }
516905
private void sendEvent(Event event, ComponentDescriptor<?> descriptor, ComponentManager componentManager)
    {
        if (this.observationManager != null) {
            this.observationManager.notify(event, componentManager, descriptor);
        }
    }
385387
public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
    {
        if (propertyChange == null)
            propertyChange = new java.beans.PropertyChangeSupport(this);
        propertyChange.addPropertyChangeListener(listener);
    }
730610
protected void fireEvent(E event) {

    for (L listener : this.listeners) {
      try {
        fireEvent(event, listener);
      } catch (RuntimeException e) {
        handleListenerError(listener, event, e);
      }
    }
  }
130935
public void fireLayerAttributeChangedEvent(MapLayerAttributeChangeEvent event) {
		if (isEventFirable()) {
			final MapLayerListener[] theListeners = getListeners();
			if (theListeners != null && theListeners.length > 0) {
				for (final MapLayerListener listener : theListeners) {
					listener.onMapLayerAttributeChanged(event);
				}
			}

			final GISLayerContainer<?> container = getContainer();
			if (container != null) {
				container.fireLayerAttributeChangedEvent(event);
			}
		}
	}
625796
public void sendEventsFromQueue() {
        if (null == queue || stopSending) {
            return;
        }
        LOG.fine("Scheduler called for sending events");

        int packageSize = getEventsPerMessageCall();

        while (!queue.isEmpty()) {
            final List<Event> list = new ArrayList<Event>();
            int i = 0;
            while (i < packageSize && !queue.isEmpty()) {
                Event event = queue.remove();
                if (event != null && !filter(event)) {
                    list.add(event);
                    i++;
                }
            }
            if (list.size() > 0) {
                executor.execute(new Runnable() {
                    public void run() {
                        try {
                            sendEvents(list);
                        } catch (MonitoringException e) {
                            e.logException(Level.SEVERE);
                        }
                    }
                });

            }
        }

    }