@Override public T setCondition(ErrorCondition condition) { link.setCondition(condition); return self(); }
@Override public void onResponse(AmqpProtocolConverter converter, Response response) throws IOException { if (response.isException()) { link.setSource(null); Throwable exception = ((ExceptionResponse) response).getException(); if (exception instanceof SecurityException) { link.setCondition(new ErrorCondition(AmqpError.UNAUTHORIZED_ACCESS, exception.getMessage())); } else { link.setCondition(new ErrorCondition(AmqpError.INTERNAL_ERROR, exception.getMessage())); } link.close(); link.free(); } } });
@Override public void onResponse(AmqpProtocolConverter converter, Response response) throws IOException { if (response.isException()) { link.setSource(null); Throwable exception = ((ExceptionResponse) response).getException(); if (exception instanceof SecurityException) { link.setCondition(new ErrorCondition(AmqpError.UNAUTHORIZED_ACCESS, exception.getMessage())); } else { link.setCondition(new ErrorCondition(AmqpError.INTERNAL_ERROR, exception.getMessage())); } link.close(); link.free(); } } });
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); } }
link.setCondition(error); link.close(); closedLinks.add(link);
link.setCondition(errorCondition); link.close();
@Override public void close(ErrorCondition error) { if (!closed) { if (getEndpoint() != null) { if (getEndpoint() instanceof Sender) { getEndpoint().setSource(null); } else { getEndpoint().setTarget(null); } getEndpoint().setCondition(error); } close(); } }
@Override public void close(ErrorCondition error) { if (!closed) { if (getEndpoint() != null) { if (getEndpoint() instanceof Sender) { getEndpoint().setSource(null); } else { getEndpoint().setTarget(null); } getEndpoint().setCondition(error); } close(); } }