@Override public void onTransportClosed(Event event) { final Connection connection = event.getConnection(); final Transport transport = event.getTransport(); final ErrorCondition condition = transport.getCondition(); if (TRACE_LOGGER.isInfoEnabled()) { TRACE_LOGGER.info(String.format(Locale.US, "onTransportClosed: hostname[%s], error[%s]", connection != null ? connection.getHostname() : "n/a", (condition != null ? condition.getDescription() : "n/a"))); } if (connection != null && connection.getRemoteState() != EndpointState.CLOSED) { // if the remote-peer abruptly closes the connection without issuing close frame // issue one this.amqpConnection.onConnectionError(condition); } }
@Override public void onTransportError(Event event) { final Connection connection = event.getConnection(); final Transport transport = event.getTransport(); final ErrorCondition condition = transport.getCondition(); if (TRACE_LOGGER.isWarnEnabled()) { TRACE_LOGGER.warn(String.format(Locale.US, "onTransportError: hostname[%s], error[%s]", connection != null ? connection.getHostname() : "n/a", condition != null ? condition.getDescription() : "n/a")); } if (connection != null && connection.getRemoteState() != EndpointState.CLOSED) { // if the remote-peer abruptly closes the connection without issuing close frame // issue one this.amqpConnection.onConnectionError(condition); } // onTransportError event is not handled by the global IO Handler for cleanup transport.unbind(); this.notifyTransportErrors(event); }
@Override public void onTransportError(Event event) { ErrorCondition condition = event.getTransport().getCondition(); if (condition != null) { TRACE_LOGGER.warn("Connection.onTransportError: hostname:{}, error:{}", event.getConnection().getHostname(), condition.getDescription()); } else { TRACE_LOGGER.warn("Connection.onTransportError: hostname:{}. error:{}", event.getConnection().getHostname(), "no description returned"); } this.messagingFactory.onConnectionError(condition); Connection connection = event.getConnection(); if(connection != null) { connection.free(); } this.notifyTransportErrors(event); }
final ErrorCondition errorCondition = transport.getCondition(); final String hostName = event.getReactor().getConnectionAddress(connection); final ProxySelector proxySelector = ProxySelector.getDefault();
final ErrorCondition errorCondition = transport.getCondition(); final String hostName = event.getReactor().getConnectionAddress(connection); final ProxySelector proxySelector = ProxySelector.getDefault();