/** * Creates an InOptionalOut exchange and propagates the correlation id from the given exchange * to the newly created exchange * @param srcExchange * @return InOptionalOut * @throws MessagingException */ public InOptionalOut createInOptionalOutExchange(MessageExchange srcExchange) throws MessagingException { MessageExchangeFactory factory = getExchangeFactory(); InOptionalOut inOptionalOut = factory.createInOptionalOutExchange(); propagateCorrelationId(srcExchange, inOptionalOut); return inOptionalOut; }
/** * Creates an InOptionalOut exchange and propagates the correlation id from the given exchange * to the newly created exchange * @param srcExchange * @return InOptionalOut * @throws MessagingException */ public InOptionalOut createInOptionalOutExchange(MessageExchange srcExchange) throws MessagingException { MessageExchangeFactory factory = getExchangeFactory(); InOptionalOut inOptionalOut = factory.createInOptionalOutExchange(); propagateCorrelationId(srcExchange, inOptionalOut); return inOptionalOut; }
public InOptionalOut createInOptionalOutExchange() throws MessagingException { InOptionalOut exchange = getExchangeFactory().createInOptionalOutExchange(); NormalizedMessage in = exchange.createMessage(); exchange.setInMessage(in); return exchange; }
public InOptionalOut createInOptionalOutExchange() throws MessagingException { InOptionalOut exchange = getExchangeFactory().createInOptionalOutExchange(); NormalizedMessage in = exchange.createMessage(); exchange.setInMessage(in); return exchange; }
/** * Return a <code>MessageExchangeDecorator</code> for Consumer, as * <code>InOptionalOut</code>. * * @see javax.jbi.messaging.MessageExchangeFactory#createInOptionalOutExchange() * @return * the message exchange * @throws MessagingException * impossible to create the message exchange */ public InOptionalOut createInOptionalOutExchange() throws MessagingException { // Create the concrete message exchange MessageExchange meC = this.concreteMef.createInOptionalOutExchange(); // Convert into fake message exchange InOptionalOut meF = (InOptionalOut) Convert. convertConcreteMessageExchangeToFakeMessageExchange(meC, Convert.IN_OPTIONAL_OUT_PATTERN); ((org.objectweb.petals.tools.rmi.common.serializable. MessageExchange) meF).setRole(meC.getRole()); // Store the messages this.messages.put(meF.getExchangeId(), meC); return meF; }
protected MessageExchange createJbiMessageExchange(Exchange camelExchange, MessageExchangeFactory exchangeFactory, String defaultMep) throws MessagingException, URISyntaxException { // option 1 -- use the MEP that was configured on the endpoint URI ExchangePattern mep = ExchangePattern.fromWsdlUri(defaultMep); if (mep == null) { // option 2 -- use the MEP from the Camel Exchange mep = camelExchange.getPattern(); } MessageExchange answer = null; if (mep != null) { if (mep == ExchangePattern.InOnly) { answer = exchangeFactory.createInOnlyExchange(); } else if (mep == ExchangePattern.InOptionalOut) { answer = exchangeFactory.createInOptionalOutExchange(); } else if (mep == ExchangePattern.InOut) { answer = exchangeFactory.createInOutExchange(); } else if (mep == ExchangePattern.RobustInOnly) { answer = exchangeFactory.createRobustInOnlyExchange(); } else { answer = exchangeFactory.createExchange(new URI(mep.toString())); } } if (getOperation(camelExchange) != null) { answer.setOperation(getOperation(camelExchange)); } return answer; }