Used to fire a connection closed event to all listeners.
762861
void fireConnectionClosed() {
    ConnectionEvent evt = null;
    // Copy the listener list so the listener can remove itself during this method call
    ConnectionEventListener[] local =
        listeners.toArray(new ConnectionEventListener[0]);
    for (ConnectionEventListener listener : local) {
      if (evt == null) {
        evt = createConnectionEvent(null);
      }
      listener.connectionClosed(evt);
    }
  }
365883
private synchronized void notifyConnectionLost(final IoSession session) {
        new Thread("Connection-Closed-Notifier") {
            @Override
            public void run() {
                // todo: sml: should consider rationalising these so they're all HandlerListeners..
                if (connectedObjectManager != null) {
                    connectedObjectManager.sessionTerminated(session);
                }
                for (HandlerListener listener : handlerListeners) {
                    listener.sessionClosed(session);
                }
                RequestResponseManager requestResponseManager = (RequestResponseManager) session.getAttribute(RequestResponseManager.SESSION_KEY);
                if (requestResponseManager != null) {
                    requestResponseManager.sessionClosed(session);
                }
            }
        }.start();
    }
227807
protected void fireEditingStopped() {
        // Guaranteed to return a non-null array
        Object[] listeners = listenerList.getListenerList();
        // Process the listeners last to first, notifying
        // those that are interested in this event
        for (int i = listeners.length-2; i>=0; i-=2) {
            if (listeners[i]==CellEditorListener.class) {
                ((CellEditorListener)listeners[i+1]).editingStopped(new ChangeEvent(this));
            }
        }
    }
872043
private void fireSocketClosedEvent(final Exception listenerException) {
    synchronized (listenerList) {
        for (Iterator iter = listenerList.iterator(); iter.hasNext();) {
            SocketNodeEventListener snel =
                    (SocketNodeEventListener) iter.next();
            if (snel != null) {
                snel.socketClosedEvent(listenerException);
            }
        }
    }
  }
622962
def closed(self, code, reason=None):
        """"""
        self.emit('socket_closed', code, reason)
        self._recover_network_failure()
1293533
def on_close(self):
        ''' 

        '''
        log.info('WebSocket connection closed: code=%s, reason=%r', self.close_code, self.close_reason)
        if self.connection is not None:
            self.application.client_lost(self.connection)
951521
protected void finishConnection() {
    this.connector.dispose();
    this.connector = null;
    for (ConnectionListener listener : this.connectionListeners) {
      listener.connectionEnded(this);
    }
    if (this.executors != null) {
      this.executors.destroy();
    }
  }
1251978
def closed(self, reason):
        """"""
        self.server.remove_connection(self)
        self.protocol.connection_lost(reason)
        if not isinstance(reason, ConnectionClosed):
            logger.warn("connection closed, reason: %s" % str(reason))
        else:
            logger.info("connection closed")
794700
void connectionClosed(final SibRaConnection connection) {

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, "connectionClosed", connection);
        }

        final ConnectionEvent event = new ConnectionEvent(this,
                ConnectionEvent.CONNECTION_CLOSED);
        event.setConnectionHandle(connection);

        for (Iterator iterator = _eventListeners.iterator(); iterator.hasNext();) {

            final ConnectionEventListener listener = (ConnectionEventListener) iterator
                    .next();
            listener.connectionClosed(event);

        }

        _connections.remove(connection);

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, "connectionClosed");
        }

    }
846175
def _on_closed(self):
        """"""
        LOGGER.error('Redis connection closed')
        self.connected = False
        self._on_close()
        self._stream = None
265332
def close(self):
        """"""
        if self.connection:
            self.connection.close()
            self.connection = None
            logging.debug("Connection closed.")
496725
public void fire(T event) {
		ArrayList<Listener<T>> list1;
		ArrayList<Runnable> list2;
		synchronized (this) {
			if (listeners == null) list1 = null;
			else list1 = new ArrayList<>(listeners);
			if (listenersRunnable == null) list2 = null;
			else list2 = new ArrayList<>(listenersRunnable);
		}
		if (list1 != null)
			for (int i = 0; i < list1.size(); ++i)
				try { list1.get(i).fire(event); }
				catch (Throwable t) {
					LCCore.getApplication().getDefaultLogger().error("Event listener error: " + list1.get(i), t);
				}
		if (list2 != null)
			for (int i = 0; i < list2.size(); ++i)
				try { list2.get(i).run(); }
				catch (Throwable t) {
					LCCore.getApplication().getDefaultLogger().error("Event listener error: " + list2.get(i), t);
				}
	}
1366438
protected final void fireChildrenRemoved(BeanContextMembershipEvent event)
	{
		Object listeners[];
		synchronized (bcmListeners)
		{
			listeners = bcmListeners.toArray();
		}
		for (int i = 0; i < listeners.length; i++)
		{
			BeanContextMembershipListener l = (BeanContextMembershipListener) listeners[i];
			l.childrenRemoved(event);
		}
	}
637907
private function handleClose()
    {
        foreach ($this->timer as $timer) {
            $this->loop->cancelTimer($timer);
        }

        $connection = $this->connection;

        $this->isConnecting = false;
        $this->isDisconnecting = false;
        $this->isConnected = false;
        $this->connection = null;
        $this->stream = null;

        if ($connection !== null) {
            $this->emit('close', [$connection, $this]);
        }
    }
365431
@SuppressWarnings("unchecked")
	protected void fireCleared(boolean localClearing) {
		for (final DMapListener<? super K, ? super V> listener : this.listeners.getListeners(DMapListener.class)) {
			listener.mapCleared(localClearing);
		}
	}
790807
def fire_framework_stopping(self):
        
        with self.__fw_lock:
            # Copy the list of listeners
            listeners = self.__fw_listeners[:]

        for listener in listeners:
            try:
                listener.framework_stopping()
            except:
                self._logger.exception(
                    "An error occurred calling one of the "
                    "framework stop listeners"
                )
172954
@Override
    public void doSessionClosedListeners() {
        runManagementTask(new Runnable() {
            @Override
            public void run() {
                try {
                    // The particular management listeners change on strategy, so get them here.
                    for (final SessionManagementListener listener : getManagementListeners()) {
                        listener.doSessionClosed(SessionManagementBeanImpl.this);
                    }

                    // XXX should there be a markChanged() here because the session status is now closed?
                    // Or is that covered by the fact we generate a session-closed message?
                } catch (Exception ex) {
                    logger.warn("Error during doSessionClosed session listener notifications:", ex);
                }
            }
        });
    }