Notifies all registered listeners of the inactive peer
331058
private void notifyInactive(Peer peer) {
		for(Listener listener : new HashSet<>(listeners)) {
			listener.onInactive(peer);
		}
	}
272239
def notify_peer_message(self, message, sender_id):
        """"""
        payload = message.SerializeToString()
        self._notify(
            "consensus_notifier_notify_peer_message",
            payload,
            len(payload),
            sender_id,
            len(sender_id))
737367
def notify(self, msg):
        
        for listener in self.listeners:
            self._send(listener, msg)
606323
public synchronized void notifyObservers(Object arg) {
        for (int i = 0; i < observers.size(); i++) {
            observers.elementAt(i).update(this, arg);
        }
    }
1248820
private void notifyHeartbeat() {
    ArrayList<NGHeartbeatListener> listeners;
    synchronized (heartbeatListeners) {
      if (heartbeatListeners.isEmpty()) {
        return;
      }
      // copy collection to avoid executing callbacks under lock
      listeners = new ArrayList<>(heartbeatListeners);
    }

    for (NGHeartbeatListener listener : listeners) {
      listener.heartbeatReceived();
    }
  }
435703
void notifyListenersNetworkReachable() {
        // NOTE: synchronized(listener) causes deadlock with listeners and Replicator.lock.
        final Set<NetworkReachabilityListener> copy = new HashSet<>(listeners);
        for (NetworkReachabilityListener listener : copy) {
            if (listener != null) { listener.networkReachable(); }
        }
    }
1058757
function listenerAtPhase(inst, event, propagationPhase) {
  var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
  return getListener(inst, registrationName);
}
483722
function onPeerConnected(peer)
    {
        if(scope.localStream)
        {
            peer.updateStream(scope.localStream,false);
        }
        scope._servConn.sendRTCState(true,peer.id);

        scope.dispatchEvent("peerConnected",peer.id);
    }
716072
function onPeerClose(peer)
    {
        var id = peer.id;
        scope.removePeer(peer);
        sendPeerClose(id);

        scope.dispatchEvent("peerDisconnected",id);
    }
309581
public void flush()
    {
        //  The peer does not exist anymore at this point.
        if (state == State.TERM_ACK_SENT) {
            return;
        }

        if (outpipe != null && !outpipe.flush()) {
            sendActivateRead(peer);
        }
    }
1353188
protected void onRemoved() {
        List<FilterChangeListener> listeners = getAllListeners();
        for (FilterChangeListener listener : listeners) {
            listener.onRemove(this);
        }
    }
29813
private void notifyListeners() {
        WriterListener[] writerListeners;
        synchronized (listeners) {
            writerListeners = new WriterListener[listeners.size()];
            listeners.toArray(writerListeners);
        }
        String str = stringBuilder.toString();
        stringBuilder.setLength(0);
        for (WriterListener writerListener : writerListeners) {
            writerListener.write(str);
        }
    }
23475
protected void listen() {
        if (!connectedFlag.get() || releaseNeeded.get()) {
            return;
        }

        releaseNeeded.set(true);
        try {
            send(pushListener, new OnFinishedHandler() {
                @Override
                public void onFinished() {
                    releaseNeeded.set(false);
                    listen();
                }
            });
        } catch (Exception e) {
            LOG.error("Error in sending long poll", e);
        }
    }
1075147
function () {
      //retrive next messages.
      //TODO: respond to back pressure from streams to each peer.
      //if a given stream is paused, don't retrive more msgs
      //for that peer/stream.
      for(var id in this.state.peers) {
        var state = this.state.peers[id]
        while(state.retrive.length) {
          var id = state.retrive.shift()
          if(state.replicating[id])
            opts.getAt({id: id, sequence:state.replicating[id].sent+1}, this._retrive)
        }
      }
      if(this.state.receive.length) {
        var ev = this.state.receive.shift()
        opts.append(ev.value, function (err, data) {
          if(err) {
            if(this.logging) console.error('EBT:err', err)
            self.block(ev.value.author, ev.id, true)
          }
          else self.onAppend(ev.value)
        })
      }
      for(var k in this.streams)
        this.streams[k].resume()
    }
1297415
public function listen()
    {
        $notifications = $this->repository->findSendable()->toArray();

        foreach ($notifications as $notification) {
            $this->listenNotificationsEvents($notification);
        }
    }
921150
public void addConnectedEventListener(Executor executor, PeerConnectedEventListener listener) {
        peerConnectedEventListeners.add(new ListenerRegistration<>(checkNotNull(listener), executor));
        for (Peer peer : getConnectedPeers())
            peer.addConnectedEventListener(executor, listener);
        for (Peer peer : getPendingPeers())
            peer.addConnectedEventListener(executor, listener);
    }
1260764
def list_listeners(self, retrieve_all=True, **_params):
        """"""
        return self.list('listeners', self.lbaas_listeners_path,
                         retrieve_all, **_params)