@Override public void merge(RoutingContext context) { DocumentProtocol.merge(context); }
public void merge(RoutingContext ctx) { DocumentProtocol.merge(ctx); }
@Override public void merge(RoutingContext ctx) { DocumentProtocol.merge(ctx); }
@Override public void merge(RoutingContext context) { DocumentProtocol.merge(context); }
public void merge(RoutingContext context) { DocumentProtocol.merge(context); }
public void merge(RoutingContext ctx) { DocumentProtocol.merge(ctx); }
public void merge(RoutingContext ctx) { DocumentProtocol.merge(ctx); }
/** * This is a convenient entry to the {@link #merge(RoutingContext,Set)} method by way of a routing context object. * The replies of all child contexts are merged and stored in the context. * * @param ctx The context whose children to merge. */ public static void merge(RoutingContext ctx) { merge(ctx, new HashSet<Integer>(0)); }
/** * This method implements the common way to merge document replies for whatever routing policy. In case of an error * in any of the replies, it will prepare an EmptyReply() and add all errors to it. If there are no errors, this * method will use the first reply in the list and transfer whatever feed answers might exist in the replies to it. * * * @param replies The replies to merge. * @return The merged Reply. */ public static Reply merge(List<Reply> replies) { return merge(replies, new HashSet<Integer>(0)).second; }
/** * This method implements the common way to merge document replies for whatever routing policy. In case of an error * in any of the replies, it will prepare an EmptyReply() and add all errors to it. If there are no errors, this * method will use the first reply in the list and transfer whatever feed answers might exist in the replies to it. * * @param ctx The context whose children to merge. * @param mask The indexes of the children to skip. */ public static void merge(RoutingContext ctx, Set<Integer> mask) { List<Reply> replies = new LinkedList<>(); for (RoutingNodeIterator it = ctx.getChildIterator(); it.isValid(); it.next()) { Reply ref = it.getReplyRef(); replies.add(ref); } Tuple2<Integer, Reply> tuple = merge(replies, mask); if (tuple.first != null) { ctx.getChildIterator().skip(tuple.first).removeReply(); } ctx.setReply(tuple.second); }
@Override public ContentChannel handleResponse(Response response) { synchronized (this) { if (response instanceof MbusResponse) { Reply reply = ((MbusResponse)response).getReply(); requestTrace.addChild(reply.getTrace().getRoot()); replies.add(reply); } if (--numPending != 0) { return null; } } requestMsg.getTrace().getRoot().addChild(requestTrace); Reply reply = DocumentProtocol.merge(replies); Response mbusResponse = new MbusResponse(StatusCodes.fromMbusReply(reply), reply); ResponseDispatch.newInstance(mbusResponse).dispatch(responseHandler); return null; }