Sends the appropriate {@link VolumeChangeEvent} to all registered
{@link VolumeChangeListener}.

@param source source of event
@param volume the new volume
776213
public synchronized void fireVolumeChangeEvent(Object source, int volume) {
        VolumeChangeEvent vce = new VolumeChangeEvent(source, volume);

        for (VolumeChangeListener vcl : volListeners) {
            vcl.volumeChanged(vce);
        }
    }
521520
def set_volume(self, volume):
        
        msg = cr.Message()
        msg.type = cr.SET_VOLUME
        msg.request_set_volume.volume = int(volume)
        self.send_message(msg)
886226
public static void fire(final HasSlideEnabledHandlers source) {
        if (TYPE != null) {
            SlideEnabledEvent event = new SlideEnabledEvent();
            source.fireEvent(event);
        }
    }
315315
public void fireEvent(CmsEvent event) {

        fireEventHandler(m_eventListeners.get(event.getTypeInteger()), event);
        fireEventHandler(m_eventListeners.get(I_CmsEventListener.LISTENERS_FOR_ALL_EVENTS), event);
    }
1075570
public void addListener(FileChangeListener fileChangeListener) {
		Assert.notNull(fileChangeListener, "FileChangeListener must not be null");
		synchronized (this.monitor) {
			checkNotStarted();
			this.listeners.add(fileChangeListener);
		}
	}
1065409
public void dispatchEvent(IEvent event) {
        for (IEventListener listener : listeners) {
            if (event.getSource() == null || event.getSource() != listener) {
                listener.notifyEvent(event);
            }
        }
    }
96746
@NonNull
    public ListenerToken addChangeListener(Executor executor, @NonNull DatabaseChangeListener listener) {
        if (listener == null) { throw new IllegalArgumentException("listener cannot be null."); }

        synchronized (lock) {
            mustBeOpen();
            return addDatabaseChangeListener(executor, listener);
        }
    }
888446
public static void fire(final HasSummernoteInitHandlers source) {
        if (TYPE != null) {
            SummernoteInitEvent event = new SummernoteInitEvent();
            source.fireEvent(event);
        }
    }
171377
@UiHandler("m_projectSelector")
    protected void onProjectChange(ValueChangeEvent<String> event) {

        if (m_initialized) {
            m_publishDialog.setProjectId(new CmsUUID(event.getValue()));
            m_publishDialog.setProjectChanged();
            m_publishDialog.updateResourceList();
        }
    }
81960
@Override
    public void send(Event event) {
        if (!closed) {
            queue.add(withPayload(new EventSubmitter(id, event)));
        }
    }
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);
            }
        }
    }
223074
public void setVolumeIds(java.util.Collection<String> volumeIds) {
        if (volumeIds == null) {
            this.volumeIds = null;
            return;
        }

        this.volumeIds = new com.amazonaws.internal.SdkInternalList<String>(volumeIds);
    }
535288
public void addCustomerSource(
            @NonNull String sourceId,
            @NonNull @Source.SourceType String sourceType,
            @Nullable SourceRetrievalListener listener) {
        final Map<String, Object> arguments = new HashMap<>();
        arguments.put(KEY_SOURCE, sourceId);
        arguments.put(KEY_SOURCE_TYPE, sourceType);

        final String operationId = UUID.randomUUID().toString();
        if (listener != null) {
            mSourceRetrievalListeners.put(operationId, listener);
        }
        mEphemeralKeyManager.retrieveEphemeralKey(operationId, ACTION_ADD_SOURCE, arguments);
    }
199054
public void propertyChange(PropertyChangeEvent event)
	{
		if (contains(event.getSource()) && "beanContext".equals(event.getPropertyName()) && event.getOldValue() == getBeanContextPeer())
		{
			remove(event.getSource(), false);
		}
	}
447399
public synchronized void setSource(Source source) {
        String sourceId = CollectorManagerUtils.getSourceId(source);
        SourceManager srcMgr = null;
        if (!sourceMgrs.containsKey(sourceId)) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                Tr.event(tc, "Adding source to the list", source.getClass());
            }
            srcMgr = new SourceManager(source);
            sourceMgrs.put(srcMgr.getSourceId(), srcMgr);
            /*
             * Obtain the conduit/bufferManager and put it in bufferManagerMap
             * if the source being set is message/log or trace.
             *
             * This is to make up for the prior logic where conduit/bufferManager
             * were created before the source was created and were set into the bufferManagerMap
             *
             * With the new logic concerning LogSource and TraceSource for JsonLogging, the LogSource
             * and TraceSource and their respective Conduit/BufferManager were created outside of
             * CollectorManager and OSGI serviceability. Thus, the following call to processInitializedConduits
             * retrieves the conduits/bufferManagers that were created 'outside' collectorManager's realm of
             * control and places them into bufferManagerMap because the following logic expects the prior
             * statement to be true.
             *
             * Alas, continue 'as normal' afterwards.
             */
            processInitializedConduits(source);

            //Passes BufferManager onto SourceManager which will then associate a Handler to it.
            srcMgr.setBufferManager(bufferManagerMap.get(sourceId));
            //Handle pending subscriptions for this source
            for (Entry<String, HandlerManager> entry : handlerMgrs.entrySet()) {
                HandlerManager hdlrMgr = entry.getValue();
                //Check if source is in the pending subscription list for this handler
                if (hdlrMgr.getPendingSubscriptions().contains(sourceId)) {
                    List<String> sourceIds = new ArrayList<String>();
                    sourceIds.add(sourceId);
                    try {
                        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                            Tr.debug(tc, "Handling pending subscription " + sourceId,
                                     hdlrMgr.getHandlerId());
                        }
                        subscribe(hdlrMgr.getHandler(), sourceIds);
                    } catch (Exception e) {

                    }
                }
            }
        }
    }
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);
			}
		}
	}
655453
public boolean setSoundVolume(int volume) throws CommandExecutionException {
        if (volume < 0) volume = 0;
        if (volume > 100) volume = 100;
        JSONArray payload = new JSONArray();
        payload.put(volume);
        return sendOk("change_sound_volume", payload);
    }