Notifies all registered listeners of the disconnected peer
436091
private void notifyDisconnected(Peer peer) {
		for(Listener listener : new HashSet<>(listeners)) {
			listener.onDisconnected(peer);
		}
	}
1337077
protected void notifyListeners() {
		Iterator it = listeners.iterator();
		while (it.hasNext()) {
			((ComponentListener) it.next()).componentActivated(this);
		}
	}
291945
def notice_stream(self, stream):
        
        self._routes_by_stream[stream] = set([stream.remote_id])
        self._propagate_up(mitogen.core.ADD_ROUTE, stream.remote_id,
                        stream.name)
        mitogen.core.listen(
            obj=stream,
            name='disconnect',
            func=lambda: self._on_stream_disconnect(stream),
        )
913386
protected void fireDiscoveredPeersEvent(List<Peer> peers, String hexInfoHash) {
    for (AnnounceResponseListener listener : this.listeners) {
      listener.handleDiscoveredPeers(peers, hexInfoHash);
    }
  }
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);
        }
    }
1202529
private boolean notifyOnNext(final int index) {
        boolean result = true;

        for (WizardListener listener : wizardListeners) {
            result &= listener.onNext(index, viewPagerAdapter.getItem(index));
        }

        return result;
    }
124020
public synchronized void raInactive() {

		this.provider.removeSipListener(this);
		
		ListeningPoint[] listeningPoints = this.provider.getListeningPoints();
		
		for (int i = 0; i < listeningPoints.length; i++) {
			ListeningPoint lp = listeningPoints[i];
			for (int k = 0; k < 10; k++) {
				try {
					this.sipStack.deleteListeningPoint(lp);
					this.sipStack.deleteSipProvider(this.provider);
					break;
				} catch (ObjectInUseException ex) {
					tracer
							.severe(
									"Object in use -- retrying to delete listening point",
									ex);
					try {
						Thread.sleep(100);
					} catch (Exception e) {

					}
				}
			}
		}

		this.providerWrapper.raInactive();
		this.sipStack.stop();

		if (tracer.isFineEnabled()) {
			tracer.fine("Sip Resource Adaptor entity inactive.");
		}		
	}
1258558
def listen(self):
        
        import select
        while self.connected:
            r, w, e = select.select((self.ws.sock, ), (), ())
            if r:
                self.on_message()
            elif e:
                self.subscriber.on_sock_error(e)
        self.disconnect()
1050097
def listen(self, listener):
        ''''''
        for message in listener.listen():
            try:
                data = json.loads(message['data'])
                if data['event'] in ('canceled', 'lock_lost', 'put'):
                    self.kill(data['jid'])
            except:
                logger.exception('Pubsub error')
391232
def _notify_disconnected(self):
        ''' 

        '''
        if self.document is not None:
            self.document.remove_on_change(self)
            self._callbacks.remove_all_callbacks()
1326377
private <T extends Rdp4jListener> void notifyListeners(Class<T> listenerType, Notifier<T> notifier)
            throws InterruptedException {
        for (Rdp4jListener listener : listeners) {
            if (isInstanceOf(listener, listenerType)) {
                /*
                 * This cast is correct, since we check if listener
                 * is instance of listenerType.
                 */
                @SuppressWarnings("unchecked")
                T listener2 = (T) listener;
                try {
                    notifier.notify(listener2);
                } catch (InterruptedException e) {
                    throw e;
                } catch (Throwable e) {
                    logErrorMessage(e);
                }
            }
        }
    }
337368
private void notifyOnCanceled() {
        for (Listener<DataType, KeyType, ViewType, ParamType> listener : listeners) {
            listener.onCanceled(this);
        }
    }
291136
private void notifyListeners(LifecycleState oldState, LifecycleState newState)
  {
    notifyWait();
    
    // initial must be outside synchronized to avoid any blocking
    // for fail-safe shutdown
    if (_listeners == null) {
      return;
    }
    
    ArrayList<LifecycleListener> listeners = null;
    
    synchronized (this) {
      notifyAll();

      if (_listeners != null) {
        for (int i = 0; i < _listeners.size(); i++) {
          LifecycleListener listener = _listeners.get(i).get();

          if (listener != null) {
            if (listeners == null) {
              listeners = new ArrayList<LifecycleListener>();
            }
            
            listeners.add(listener);
          }
          else {
            _listeners.remove(i);
            i--;
          }
        }
      }
    }

    if (listeners != null) {
      for (LifecycleListener listener : listeners) {
        listener.lifecycleEvent(oldState, newState);
      }
    }
  }
190197
function onPeerFailed(peer)
    {
        scope._servConn.sendRTCState(false,peer.id);
        scope.dispatchEvent("peerFailed",peer.id);
    }
578059
private void onArrived()
    {
        destinationReached = true;
        moving = false;
        path = null;
        moveX = 0.0;
        moveY = 0.0;
        sharedPathIds.clear();
        for (final PathfindableListener listener : listeners)
        {
            listener.notifyArrived();
        }
    }
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();
    }
  }
1294537
protected void notifyObservers (final Name username, final boolean muted)
    {
        _observers.apply(new ObserverList.ObserverOp<MuteObserver>() {
            public boolean apply (MuteObserver observer) {
                observer.muteChanged(username, muted);
                return true;
            }
        });
    }