public void addHandlers(List newhandlers) { if (newhandlers == null) return; for (Iterator itr = newhandlers.iterator(); itr.hasNext();) { Handler handler = (Handler) itr.next(); addHandler(handler); } }
public void invoke(MessageContext context) throws Exception { log.debug("Correlating context with ID " + context.getId()); Invocation invocation = correlator.correlate(context, calls); if (invocation == null) { log.info("No correlated invocation was found."); return; } if (context != invocation.getContext()) { context.getExchange().setOperation(invocation.getContext().getExchange().getOperation()); context.getExchange().setOutMessage(invocation.getContext().getExchange().getOutMessage()); } if (invocation != null) { log.debug("Found correlated context with ID " + context.getId()); context.getInPipeline().addHandler(new ClientReceiveHandler(invocation)); } }