Called by a session to indicate that it has been closed. Removes the
session from the set held by this managed connection and notifies the
connection event listeners (which includes the connection manager).

@param session
the session that has been closed
763756
final void sessionClosed(final JmsJcaSessionImpl session) {

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

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
            SibTr.debug(this, TRACE, "Sending connection closed events to the "
                                     + _connectionListeners.size() + " listeners");
        }

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

        // Copy list to protect against concurrent modification by listener
        final List<ConnectionEventListener> copy;
        synchronized (_connectionListeners) {
            copy = new ArrayList<ConnectionEventListener>(_connectionListeners);
        }

        for (final Iterator iterator = copy.iterator(); iterator.hasNext();) {
            final Object object = iterator.next();
            if (object instanceof ConnectionEventListener) {
                ((ConnectionEventListener) object).connectionClosed(event);
            }
        }

        _sessions.remove(session);

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

    }
1233781
public synchronized void close() throws IOException {
        if(getStatus().equals(ConnectionStatus.CLOSED)){
            return ;
        }
        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("Closing client for session: 0x"
                      + getSessionId());
        }
        connectRun.set(false);

        try{
            clientSocket.cleanup();
        }catch(Exception e){
            LOGGER.warn("Close the WSDirectorySocket get error.", e);
        }

        try {
            setStatus(ConnectionStatus.CLOSED);
            sendCloseSession();
            closeSession();
            eventThread.queueEventOfDeath();
        } catch (ServiceException e) {
            LOGGER.warn("Execute the CloseSession Protocol failed when close", e);
        }
    }
173317
public void sessionDestroyed(HttpSessionEvent event) {
    if (null != eventMulticaster) {
      eventMulticaster.multicast(new HttpSessionDestroyedEvent(event.getSession()));
    }
  }
1306343
protected void closeLocalConnection(Connection connection) {
    try {
      if (connection != null && !connection.isClosed()) {
        connection.close();
      }
    } catch (SQLException e) {
      if (logger.isTraceEnabled()) {
        logger.trace(e.getMessage());
      }
    }
  }
97575
function (session) {

        if (session.websocket.server) session.websocket.server.close();

        session.proxy.close(function (err) {
            console.error('Error: ' + err);
        });
    }
1090967
@Override
	public void deleteSession(String sessionName) {
		logger.debug("deleteSession " + sessionName);
	    if (databaseServer == null) {
	    	return;
	    }
        databaseServer = null;
    }
836914
@Override
	protected void onSessionClose()
	{
    	// Rollback updates
	    try
	    {
        	if (hasPendingUpdates())
                rollbackUpdates(true,true, null);
	    }
        catch (JMSException e)
        {
            ErrorTools.log(e, log);
        }
    	
    	super.onSessionClose();
    }
118550
public void complete(Session session) {
        try {
            session.complete();
            sessionCache.put(session.getId(), session);
        } catch (Exception e) {
            log.warn("Session failed to complete", e);
        }
    }
308142
protected void connectionClosed(IoSession session) {
		this.connected = false;
		this._disconnect();
		log.info("Connection lost to aggregator at {}:{}", this.host,
				Integer.valueOf(this.port));

		while (this.stayConnected) {
			try {
				Thread.sleep(this.connectionRetryDelay);
			} catch (InterruptedException ie) {
				// Ignored
			}
			log.warn("Reconnecting to aggregator at {}:{}", this.host,
					Integer.valueOf(this.port));
			if (this.connect(this.connectionTimeout)) {
				return;
			}
			log.warn("Failed to reconnect to aggregator at {}:{}", this.host,
					Integer.valueOf(this.port));

		}
		this.finishConnection();

	}
407649
public function onSessionClose(Session $session)
    {
        if ($session->getRealm() && $session->getRealm()->getRealmName() === 'thruway.auth') {
            // session is closing in the auth domain
            // check and see if there are any registrations that came from this session
            $sessionId = $session->getSessionId();

            foreach ($this->authMethods as $methodName => $method) {
                if (isset($method['session_id']) && $method['session_id'] === $sessionId) {
                    unset($this->authMethods[$methodName]);
                }
            }
        }
    }
519648
public void sessionClosed(IoSession session) throws Exception {
        SingleSessionIoHandler handler = (SingleSessionIoHandler) session
                .getAttribute(HANDLER);
        handler.sessionClosed();
    }
194366
public void onClose(Session session, CloseReason closeReason) {
        if (getOnCloseHandle() != null) {
            callMethod(getOnCloseHandle(), getOnCloseParameters(), session, true, closeReason);
        }
    }
9121
def closed(self, reason):
        """"""
        self.client.remove_connection(self)
        self.protocol.connection_lost(reason)
        if not isinstance(reason, ConnectionClosed):
            logger.warn("connection closed, reason {}".format(reason))
        else:
            logger.info("connection closed")
1154979
public final void close () throws IOException {

        LOGGER.info("Closing was requested.");

        for (Connection c : connections) {
            c.close();
        }

        connections.clear();

        // stop session task thread
        factory.closedSession(this);
        executor.shutdown();
    }
169440
def close_session(self):
        """"""
        if not self._session.closed:
            if self._session._connector_owner:
                self._session._connector.close()
            self._session._connector = None
889119
def is_closed(self):
        
        return (self.state == SESSION_STATE.CLOSED 
                or self.state == SESSION_STATE.CLOSING)
997528
public void disconnect() {
        if (LOG.isDebugEnabled()) {
            LOG.debug("Disconnecting client for session: 0x"
                    + Long.toHexString(getSessionId()));
        }

        sendThread.close();
        eventThread.queueEventOfDeath();
    }