Send a beat grid update announcement to all registered listeners.

@param player the player whose beat grid information has changed
@param beatGrid the new beat grid associated with that player, if any
342387
private void deliverBeatGridUpdate(int player, BeatGrid beatGrid) {
        if (!getBeatGridListeners().isEmpty()) {
            final BeatGridUpdate update = new BeatGridUpdate(player, beatGrid);
            for (final BeatGridListener listener : getBeatGridListeners()) {
                try {
                    listener.beatGridChanged(update);

                } catch (Throwable t) {
                    logger.warn("Problem delivering beat grid update to listener", t);
                }
            }
        }
    }
29945
public void addListener(UpdateCheckListener newListener) {
        if (newListener == null) {
            throw new IllegalArgumentException("newListener");
        }
        GatewayVersion latestGatewayVersion = getLatestGatewayVersion();
        if (latestGatewayVersion != null && latestGatewayVersion.compareTo(currentVersion) > 0) {
            newListener.newVersionAvailable(currentVersion, latestGatewayVersion);
        }
        listeners.add(newListener);
    }
1315734
public void synchronize(CheerleaderPlayer player) {
        setTrack(player.getCurrentTrack());
        mLoader.setVisibility(INVISIBLE);
        mPlayPause.setVisibility(VISIBLE);
        setPlaying(player.isPlaying());
    }
343591
private void clearBeatGrids(DeviceAnnouncement announcement) {
        final int player = announcement.getNumber();
        // Iterate over a copy to avoid concurrent modification issues
        for (DeckReference deck : new HashSet<DeckReference>(hotCache.keySet())) {
            if (deck.player == player) {
                hotCache.remove(deck);
                if (deck.hotCue == 0) {
                    deliverBeatGridUpdate(player, null);  // Inform listeners the beat grid is gone.
                }
            }
        }
    }
1091658
protected function onHeartbeatFrame(Frame $frame, array $beats)
    {
        if ($frame->getCommand() === self::FRAME_SERVER_CONNECTED) {
            $this->intervalServer = $beats[1];
            if ($this->intervalClient === null) {
                $this->intervalClient = $this->intervalServer;
            }
        } else {
            $this->intervalClient = $beats[0];
            $this->rememberActivity();
        }
    }
346164
public function playerChecks(PlayerContract $player)
    {
        $this->checkPlayerTryingToAct($player);

        if ($this->playerBetStack($player)->amount() !== $this->betStacks()->max()->amount()) {
            throw RoundException::cantCheckWithBetActive();
        }

        $this->actions()->push(new Action($player, Action::CHECK));
        $this->leftToAct = $this->leftToAct()->playerHasActioned($player, LeftToAct::ACTIONED);
    }
1315053
private void deliverBeat(final Beat beat) {
        VirtualCdj.getInstance().processBeat(beat);
        for (final BeatListener listener : getBeatListeners()) {
            try {
                listener.newBeat(beat);
            } catch (Throwable t) {
                logger.warn("Problem delivering beat announcement to listener", t);
            }
        }
    }
487583
protected function updatePlayer($player)
    {
        $time = time();
        $upTime = $time - $this->playerLastUpTime[$player->getLogin()];
        $this->playerLastUpTime[$player->getLogin()] = $time;

        $player->setOnlineTime($player->getOnlineTime() + $upTime);
    }
963817
protected synchronized void firePlaylistChangeEvent(PlaylistChangeEvent.Event event) {
        PlaylistChangeEvent pce = new PlaylistChangeEvent(this, event);

        for (PlaylistChangeListener pcl : listeners) {
            pcl.playlistChanged(pce);
        }
    }
1114393
public void addListener(final ParticipantsListener participantsListener) {
        if (participantsListener != null) {
            MessagingListener messagingListener = new MessagingListener() {

                @Override
                public void onParticipantAdded(ParticipantAddedEvent event) {
                    participantsListener.onParticipantAdded(event);
                }

                @Override
                public void onParticipantUpdated(ParticipantUpdatedEvent event) {
                    participantsListener.onParticipantUpdated(event);
                }

                @Override
                public void onParticipantRemoved(ParticipantRemovedEvent event) {
                    participantsListener.onParticipantRemoved(event);
                }
            };
            participantsListeners.put(participantsListener, messagingListener);
            client.addListener(messagingListener);
        }
    }
914394
private synchronized void sendHeartBeat(
      final EvaluatorRuntimeProtocol.EvaluatorHeartbeatProto heartbeatProto) {
    if (LOG.isLoggable(Level.FINEST)) {
      LOG.log(Level.FINEST, "Heartbeat message:\n" + heartbeatProto, new Exception("Stack trace"));
    }
    this.evaluatorHeartbeatHandler.onNext(heartbeatProto);
  }
205337
private void deliverBeatAnnouncement(final Beat beat) {
        for (final MasterListener listener : getMasterListeners()) {
            try {
                listener.newBeat(beat);
            } catch (Throwable t) {
                logger.warn("Problem delivering master beat announcement to listener", t);
            }
        }
    }
347693
public void postSetupGrid()
    {
        Record menu = this.getMainRecord();
        BaseListener behMenu = menu.getListener(StringSubFileFilter.class.getName());
        menu.removeListener(behMenu, true);
    }
890626
protected synchronized void addShapeGeometryChangeListener(ShapeGeometryChangeListener listener) {
		assert listener != null : AssertMessages.notNullParameter();
		if (this.geometryListeners == null) {
			this.geometryListeners = new WeakArrayList<>();
		}
		this.geometryListeners.add(listener);
	}
770353
public synchronized void clearPlaybackState(int player) {
        long oldMaxPosition = 0;
        PlaybackState furthestState = getFurthestPlaybackState();
        if (furthestState != null) {
            oldMaxPosition = furthestState.position;
        }
        PlaybackState oldState = playbackStateMap.remove(player);
        long newMaxPosition = 0;
        furthestState = getFurthestPlaybackState();
        if (furthestState != null) {
            newMaxPosition = furthestState.position;
        }
        repaintDueToPlaybackStateChange(oldMaxPosition, newMaxPosition, oldState, null);
    }
4866
@Override
    public void onPlayerPlay(SoundCloudTrack track, int position) {
        int offset = mHeaderView == null ? 0 : 1;
        mPlayedTrackPosition = position + offset;
        notifyDataSetChanged();
    }
74754
private void deliverFaderStartCommand(Set<Integer> playersToStart, Set<Integer> playersToStop) {
        for (final FaderStartListener listener : getFaderStartListeners()) {
            try {
                listener.fadersChanged(playersToStart, playersToStop);
            } catch (Throwable t) {
                logger.warn("Problem delivering fader start command to listener", t);
            }
        }
    }