Using getIn or getOut methods on ExchangePage edited by Claus IbsenChanges (10)
Full ContentUsing getIn or getOut methods on ExchangeThe Camel API is influenced by APIs such as JBI specification, CXF which defines a concept called Message Exchange Patterns (MEP for short). The MEP defines the messaging style used such as one-way (InOnly) or request-reply (InOut), which means you have IN and optionally OUT messages. This closely maps to other APIs such as WS, WSDL, REST, JBI and the likes. The Exchange API provides two methods to get a message, either getIn or getOut. Obviously the getIn gets the IN message, and the getOut gets the OUT message. Now suppose you want to use a Camel Processor to adjust a message. This can be done as follows: public void process(Exchange exchange) throws Exception { String body = exchange.getIn().getBody(String.class); // change the message to say Hello exchange.getOut().setBody("Hello " + body); }
Change Notification Preferences
View Online
|
View Changes
|
Add Comment
|
- [CONF] Apache Camel > Using getIn or getOut methods on Excha... confluence
- [CONF] Apache Camel > Using getIn or getOut methods on ... confluence
- [CONF] Apache Camel > Using getIn or getOut methods on ... confluence
- [CONF] Apache Camel > Using getIn or getOut methods on ... confluence
- [CONF] Apache Camel > Using getIn or getOut methods on ... confluence
- [CONF] Apache Camel > Using getIn or getOut methods on ... confluence
- [CONF] Apache Camel > Using getIn or getOut methods on ... confluence
- [CONF] Apache Camel > Using getIn or getOut methods on ... confluence
- [CONF] Apache Camel > Using getIn or getOut methods on ... confluence
- [CONF] Apache Camel > Using getIn or getOut methods on ... confluence
- [CONF] Apache Camel > Using getIn or getOut methods on ... confluence
- [CONF] Apache Camel > Using getIn or getOut methods on ... confluence