/** * Discards this routable. Invoking this prevents the auto-generation of replies if you later discard the routable. * This is a required step to ensure safe shutdown if you need destroy a message bus instance while there are still * messages and replies alive in your application. */ public void discard() { context = null; callStack.clear(); trace.clear(); }
/** * Sets the reply of this routing node. This method also updates the internal state of this node; it is tagged for * resending if the reply has only transient errors, and the reply's {@link Trace} is copied. This method <u>does * not</u> call the parent node's {@link #notifyMerge()}. * * @param reply The reply to set. */ public void setReply(Reply reply) { if (reply != null) { shouldRetry = resender != null && resender.shouldRetry(reply); trace.getRoot().addChild(reply.getTrace().getRoot()); reply.getTrace().clear(); } this.reply = reply; }