@Override public ErrorCondition getRemoteCondition() { return link.getRemoteCondition(); }
@Override public void onLinkRemoteClose(Event event) { final Link link = event.getLink(); final ErrorCondition condition = link.getRemoteCondition(); if (TRACE_LOGGER.isInfoEnabled()) { TRACE_LOGGER.info(String.format("onLinkRemoteClose linkName[%s], errorCondition[%s], errorDescription[%s]", link.getName(), condition != null ? condition.getCondition() : "n/a", condition != null ? condition.getDescription() : "n/a")); } handleRemoteLinkClosed(event); }
@Override public void onLinkRemoteDetach(Event event) { final Link link = event.getLink(); if(link != null) { TRACE_LOGGER.debug("link remote detach. linkName:{}", link.getName()); if (link.getLocalState() != EndpointState.CLOSED) { link.close(); } this.processOnClose(link, link.getRemoteCondition()); closeSession(link); } }
@Override public void onLinkRemoteClose(Event event) { final Link link = event.getLink(); if(link != null) { TRACE_LOGGER.debug("link remote close. linkName:{}", link.getName()); if (link.getLocalState() != EndpointState.CLOSED) { link.close(); } ErrorCondition condition = link.getRemoteCondition(); this.processOnClose(link, condition); closeSession(link); } }
private void handleRemoteLinkClosed(final Event event) { final Link link = event.getLink(); final ErrorCondition condition = link.getRemoteCondition(); if (link.getLocalState() != EndpointState.CLOSED) { link.setCondition(condition); link.close(); } this.processOnClose(link, condition); this.closeSession(link, condition); } }
String sessionError = event.getSession() != null && event.getSession().getRemoteCondition() != null && event.getSession().getRemoteCondition().getCondition() != null ? event.getSession().getRemoteCondition().getCondition().toString() : ""; String connectionError = event.getConnection() != null && event.getConnection().getRemoteCondition() != null && event.getConnection().getRemoteCondition().getCondition() != null ? event.getConnection().getRemoteCondition().getCondition().toString() : ""; String linkError = event.getLink() != null && event.getLink().getRemoteCondition() != null && event.getLink().getRemoteCondition().getCondition() != null ? event.getLink().getRemoteCondition().getCondition().toString() : ""; String transportError = event.getTransport() != null && event.getTransport().getRemoteCondition() != null && event.getTransport().getRemoteCondition().getCondition() != null ? event.getTransport().getRemoteCondition().getCondition().toString() : ""; String sessionErrorDescription = event.getSession() != null && event.getSession().getRemoteCondition() != null && event.getSession().getRemoteCondition().getDescription() != null ? event.getSession().getRemoteCondition().getDescription() : ""; String connectionErrorDescription = event.getConnection() != null && event.getConnection().getRemoteCondition() != null && event.getConnection().getRemoteCondition().getDescription() != null ? event.getConnection().getRemoteCondition().getDescription() : ""; String linkErrorDescription = event.getLink() != null && event.getLink().getRemoteCondition() != null && event.getLink().getRemoteCondition().getDescription() != null ? event.getLink().getRemoteCondition().getDescription() : ""; String transportErrorDescription = event.getTransport() != null && event.getTransport().getRemoteCondition() != null && event.getTransport().getRemoteCondition().getDescription() != null ? event.getTransport().getRemoteCondition().getDescription() : "";
} else if (link.getRemoteState() == EndpointState.CLOSED) { final ClientException clientException = getClientException(link.getRemoteCondition()); logger.data(this, methodName, event, clientException, this); sd.subscriber.tell(new SubscribeResponse(engineConnection, new SubscriptionTopic(link.getName()), clientException), this); ClientException clientException = getClientException(link.getRemoteCondition()); if (link.getLocalState() != EndpointState.CLOSED && !link.detached()) { if (clientException == null) { if (link.getLocalState() != EndpointState.CLOSED) { String msg = "The server indicated that our sending link was closed due to an error condition, "; ErrorCondition remoteCondition = link.getRemoteCondition(); if (remoteCondition == null || remoteCondition.getCondition() == null) { msg += "without providing any further error information.";