|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.impl.DefaultExchangeHolder
public class DefaultExchangeHolder
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.
Note: Message body of typeFile
or WrappedFile
is not supported and
a RuntimeExchangeException
is thrown.
As opposed to normal usage where only the body part of the exchange is transferred over the wire,
this holder object serializes the following fields over the wire:
Constructor Summary | |
---|---|
DefaultExchangeHolder()
|
Method Summary | |
---|---|
static void |
addProperty(DefaultExchangeHolder payload,
String key,
Serializable property)
Adds a property to the payload. |
static DefaultExchangeHolder |
marshal(Exchange exchange)
Creates a payload object with the information from the given exchange. |
static DefaultExchangeHolder |
marshal(Exchange exchange,
boolean includeProperties)
Creates a payload object with the information from the given exchange. |
String |
toString()
|
static void |
unmarshal(Exchange exchange,
DefaultExchangeHolder payload)
Transfers the information from the payload to the exchange. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DefaultExchangeHolder()
Method Detail |
---|
public static DefaultExchangeHolder marshal(Exchange exchange)
exchange
- the exchange, must not be null
public static DefaultExchangeHolder marshal(Exchange exchange, boolean includeProperties)
exchange
- the exchange, must not be nullincludeProperties
- whether or not to include exchange properties
public static void unmarshal(Exchange exchange, DefaultExchangeHolder payload)
exchange
- the exchange to set values from the payload, must not be nullpayload
- the payload with the values, must not be nullpublic static void addProperty(DefaultExchangeHolder payload, String key, Serializable property)
payload
- the serialized payloadkey
- the property key to addproperty
- the property value to addpublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |