Search in sources :

Example 1 with ConnectionException

use of org.apache.qpid.server.protocol.v0_10.transport.ConnectionException in project qpid-broker-j by apache.

the class ServerConnection method closed.

public void closed() {
    try {
        performDeleteTasks();
        if (state == OPEN) {
            exception(new ConnectionException("connection aborted"));
        }
        LOGGER.debug("connection closed: {}", this);
        synchronized (lock) {
            List<ServerSession> values = new ArrayList<ServerSession>(channels.values());
            for (ServerSession ssn : values) {
                ssn.closed();
            }
            try {
                sender.close();
            } catch (Exception e) {
            // ignore.
            }
            sender = null;
            setState(CLOSED);
        }
    } finally {
        NamedAddressSpace addressSpace = getAddressSpace();
        if (addressSpace != null) {
            addressSpace.deregisterConnection(_amqpConnection);
        }
    }
}
Also used : ArrayList(java.util.ArrayList) NamedAddressSpace(org.apache.qpid.server.model.NamedAddressSpace) ConnectionException(org.apache.qpid.server.protocol.v0_10.transport.ConnectionException) ExecutionException(org.apache.qpid.server.protocol.v0_10.transport.ExecutionException) ServerScopedRuntimeException(org.apache.qpid.server.util.ServerScopedRuntimeException) NoSuchElementException(java.util.NoSuchElementException) ConnectionException(org.apache.qpid.server.protocol.v0_10.transport.ConnectionException)

Aggregations

ArrayList (java.util.ArrayList)1 NoSuchElementException (java.util.NoSuchElementException)1 NamedAddressSpace (org.apache.qpid.server.model.NamedAddressSpace)1 ConnectionException (org.apache.qpid.server.protocol.v0_10.transport.ConnectionException)1 ExecutionException (org.apache.qpid.server.protocol.v0_10.transport.ExecutionException)1 ServerScopedRuntimeException (org.apache.qpid.server.util.ServerScopedRuntimeException)1