public final class ExchangeBuilder extends Object
Constructor and Description |
---|
ExchangeBuilder(CamelContext context) |
Modifier and Type | Method and Description |
---|---|
static ExchangeBuilder |
anExchange(CamelContext context)
Create the exchange by setting the camel context
|
Exchange |
build()
Build up the exchange from the exchange builder
|
ExchangeBuilder |
withBody(Object body)
Set the in message body on the exchange
|
ExchangeBuilder |
withHeader(String key,
Object value)
Set the message header of the in message on the exchange
|
ExchangeBuilder |
withPattern(ExchangePattern pattern)
Set the message exchange pattern on the exchange
|
ExchangeBuilder |
withProperty(String key,
Object value)
Set the exchange property
|
public ExchangeBuilder(CamelContext context)
public static ExchangeBuilder anExchange(CamelContext context)
context
- the camel contextpublic ExchangeBuilder withBody(Object body)
body
- the bodypublic ExchangeBuilder withHeader(String key, Object value)
key
- the key of the headervalue
- the value of the headerpublic ExchangeBuilder withPattern(ExchangePattern pattern)
pattern
- exchange patternpublic ExchangeBuilder withProperty(String key, Object value)
key
- the key of the exchange propertyvalue
- the value of the exchange propertyApache Camel