@Override public void onLinkRemoteClose(Event event) { close(event.getLink()); } }
@Override public void onLinkRemoteClose(Event event) { close(event.getLink()); } }
/** * Event handler for the link flow event. Handles sending a single message. * @param event The Proton Event object. */ @Override public void onLinkFlow(Event event) { // Codes_SRS_AMQPSIOTHUBCONNECTION_15_040: [The event handler shall save the remaining link credit.] this.linkCredit = event.getLink().getCredit(); }
/** * Event handler for the link remote open event. This signifies that the * {@link org.apache.qpid.proton.reactor.Reactor} is ready, so we set the connection to OPEN. * @param event The Proton Event object. */ @Override public void onLinkRemoteOpen(Event event) { // Codes_SRS_AMQPSIOTHUBCONNECTION_15_041: [The connection state shall be considered OPEN when the sender link is open remotely.] Link link = event.getLink(); if (link.getName().equals(sendTag)) { this.state = State.OPEN; } }
@Override public void onLinkLocalOpen(Event event) { Link link = event.getLink(); if (link instanceof Sender) { Sender sender = (Sender) link; if (TRACE_LOGGER.isInfoEnabled()) { TRACE_LOGGER.info(String.format("onLinkLocalOpen linkName[%s], localTarget[%s]", sender.getName(), sender.getTarget())); } } }
@Override public void onLinkLocalOpen(Event evt) { Link link = evt.getLink(); if (link instanceof Receiver) { Receiver receiver = (Receiver) link; if (TRACE_LOGGER.isInfoEnabled()) { TRACE_LOGGER.info( String.format("onLinkLocalOpen linkName[%s], localSource[%s]", receiver.getName(), receiver.getSource())); } } }
@Override public void onLinkLocalClose(Event event) { Link link = event.getLink(); if (link != null) { TRACE_LOGGER.debug("local link close. linkName:{}", link.getName()); } closeSession(link); }
@Override public void onLinkLocalOpen(Event evt) { Link link = evt.getLink(); if (link instanceof Receiver) { Receiver receiver = (Receiver) link; TRACE_LOGGER.debug("onLinkLocalOpen: linkName:{}, localSource:{}", receiver.getName(), receiver.getSource()); } }
@Override public void onLinkRemoteDetach(Event event) { final Link link = event.getLink(); final ErrorCondition condition = link.getCondition(); if (TRACE_LOGGER.isInfoEnabled()) { TRACE_LOGGER.info(String.format("onLinkRemoteDetach 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 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 onLinkLocalClose(Event event) { final Link link = event.getLink(); final ErrorCondition condition = link.getCondition(); if (TRACE_LOGGER.isInfoEnabled()) { TRACE_LOGGER.info(String.format("onLinkLocalClose linkName[%s], errorCondition[%s], errorDescription[%s]", link.getName(), condition != null ? condition.getCondition() : "n/a", condition != null ? condition.getDescription() : "n/a")); } closeSession(link, link.getCondition()); }
/** * Event handler for the link init event * @param event The proton event object */ @Override public void onLinkInit(Event event) { // Codes_SRS_SERVICE_SDK_JAVA_AMQPSENDHANDLER_12_016: [The event handler shall create a new Target (Proton) object using the given endpoint address] // Codes_SRS_SERVICE_SDK_JAVA_AMQPSENDHANDLER_12_017: [The event handler shall get the Link (Proton) object and set its target to the created Target (Proton) object] Link link = event.getLink(); Target t = new Target(); t.setAddress(ENDPOINT); link.setTarget(t); }
@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 processEventLinkLocalState(Event event) { final String methodName = "processEventLinkLocalState"; logger.entry(this, methodName, event); Link link = event.getLink(); logger.data(this, methodName, "LINK_LOCAL {} {} {}", link, link.getLocalState(), link.getRemoteState()); logger.exit(this, methodName); }
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); } }
/** * Event handler for the link flow event. Handles sending a single message. * @param event The Proton Event object. */ @Override public void onLinkFlow(Event event) { logger.LogDebug("Entered in method %s", logger.getMethodName()); this.linkCredit = event.getLink().getCredit(); logger.LogDebug("The link credit value is %s, method name is %s", this.linkCredit, logger.getMethodName()); logger.LogDebug("Exited from method %s", logger.getMethodName()); }
/** * Event handler for the link flow event. Handles sending a single message. * @param event The Proton Event object. */ @Override public void onLinkFlow(Event event) { logger.LogDebug("Entered in method %s", logger.getMethodName()); // Codes_SRS_AMQPSIOTHUBCONNECTION_15_040: [The event handler shall save the remaining link credit.] this.linkCredit = event.getLink().getCredit(); logger.LogDebug("The link credit value is %s, method name is %s", this.linkCredit, logger.getMethodName()); logger.LogDebug("Exited from method %s", logger.getMethodName()); }
@Override public void onLinkRemoteOpen(Event event) { Link link = event.getLink(); if (link.getLocalState() == EndpointState.UNINITIALIZED) { if (link.getRemoteSource() != null) { link.setSource(link.getRemoteSource().copy()); } if (link.getRemoteTarget() != null) { link.setTarget(link.getRemoteTarget().copy()); } } open(link); }
@Override public void onLinkRemoteOpen(Event event) { Link link = event.getLink(); if (link.getLocalState() == EndpointState.UNINITIALIZED) { if (link.getRemoteSource() != null) { link.setSource(link.getRemoteSource().copy()); } if (link.getRemoteTarget() != null) { link.setTarget(link.getRemoteTarget().copy()); } } open(link); }