protected void processProviderAsync(MessageExchange exchange) throws Exception { if (exchange.getStatus() == ExchangeStatus.DONE) { String correlationId = (String) exchange.getProperty(correlation); if (correlationId == null) { throw new IllegalStateException(correlation + " property not found"); } // Ack last target hit MessageExchange me = (MessageExchange) store.load(correlationId); done(me); } else if (exchange.getStatus() == ExchangeStatus.ERROR) { String correlationId = (String) exchange.getProperty(correlation); if (correlationId == null) { throw new IllegalStateException(correlation + " property not found"); } // Ack last target hit MessageExchange me = (MessageExchange) store.load(correlationId); done(me); } else if (!(exchange instanceof InOut)) { throw new IllegalStateException("Use an InOut MEP"); } else { MessageExchange me = getExchangeFactory().createInOutExchange(); me.setProperty(correlation, exchange.getExchangeId()); me.setProperty(index, new Integer(0)); targets[0].configureTarget(me, getContext()); store.store(exchange.getExchangeId(), exchange); MessageUtil.transferInToIn(exchange, me); send(me); } }
targets[i].configureTarget(me, getContext()); if (i == 0) { MessageUtil.transferInToIn(current, me); } else { MessageUtil.transferOutToIn(current, me);
MessageUtil.transferInToIn(exchange, tme); send(tme); } else {
transformer.configureTarget(tme, getContext()); MessageUtil.transferInToIn(exchange, tme); sendSync(tme);
MessageUtil.transferInToIn(exchange, enricherTargetME);
: getExchangeFactory().createInOnlyExchange(); target.configureTarget(t1, getContext()); MessageUtil.transferInToIn(t0, t1); t1.setProperty(responseCorrIdProperty, correlationId); t1.getMessage("in").setProperty(responseCorrIdProperty, correlationId);