LibraryLink ToToggle FramesPrintFeedback

The Exchange Interface

An instance of org.apache.camel.Exchange type encapsulates all of the messages belonging to a single message exchange. For example, a typical synchronous invocation consists of an In message and an Out message.

Figure 9.1 shows the inheritance hierarchy for the exchange type. You do not always need to implement a custom exchange type for a component. In many cases, the default implementation, DefaultExchange, is adequate.


Example 9.1 shows the definition of the org.apache.camel.Exchange interface.


The Exchange interface defines the following methods:



[3] The DefaultExchange class also defines a setFault() method.