private void closeHandler(ProtonReceiver receiver, AsyncResult<ProtonReceiver> ar) { // link detached without error, so the "will" should be cleared and not sent if (ar.succeeded()) { LOG.info("Clean disconnection from {}", receiver.getName()); // TODO: for now nothing to do ? // link detached with error, so the "will" should be sent } else { LOG.info("Brute disconnection from {}", receiver.getName()); ErrorCondition errorCondition = new ErrorCondition(receiver.getRemoteCondition().getCondition(), String.format("client detached with: %s", receiver.getRemoteCondition().getDescription())); receiver.setCondition(errorCondition); } receiver.close(); if (this.disconnectionHandler != null) { this.disconnectionHandler.handle(new DisconnectionData(receiver.getName(), ar.failed())); } }
connectPromise.complete(null); } else { handleError(conn, receiver.getRemoteCondition()); if (receiver.getRemoteCondition() != null && LinkError.REDIRECT.equals(receiver.getRemoteCondition().getCondition())) { String relocated = (String) receiver.getRemoteCondition().getInfo().get("address"); log.info("Receiver link redirected to '" + relocated + "'"); Source newSource = linkOptions.getSource(); handleError(conn, receiver.getRemoteCondition());
final ErrorCondition error = receiver.getRemoteCondition(); if (error == null) { LOG.debug("opening receiver [{}] failed", sourceAddress, recvOpen.cause());