org.apache.camel.impl
Class DefaultExchangeHolder
java.lang.Object
org.apache.camel.impl.DefaultExchangeHolder
- All Implemented Interfaces:
- Serializable
public class DefaultExchangeHolder
- extends Object
- implements Serializable
Holder object for sending an exchange over a remote wire as a serialized object.
This is usually configured using the transferExchange=true option on the endpoint.
As opposed to normal usage where only the body part of the exchange is transfered over the wire,
this holder object serializes the following fields over the wire:
- in body
- out body
- in headers
- out headers
- fault body
- fault headers
- exchange properties
- exception
Any object that is not serializable will be skipped and Camel will log this at WARN level.
- Version:
- $Revision: 769448 $
- See Also:
- Serialized Form
DefaultExchangeHolder
public DefaultExchangeHolder()
marshal
public static DefaultExchangeHolder marshal(Exchange exchange)
- Creates a payload object with the information from the given exchange.
Only marshal the Serializable object
- Parameters:
exchange
- the exchange
- Returns:
- the holder object with information copied form the exchange
unmarshal
public static void unmarshal(Exchange exchange,
DefaultExchangeHolder payload)
- Transfers the information from the payload to the exchange.
- Parameters:
exchange
- the exchange to set values from the payloadpayload
- the payload with the values
toString
public String toString()
- Overrides:
toString
in class Object
Apache CAMEL