Package org.apache.camel.builder
Class ExchangeBuilder
- java.lang.Object
-
- org.apache.camel.builder.ExchangeBuilder
-
-
Constructor Summary
Constructors Constructor Description ExchangeBuilder(org.apache.camel.CamelContext context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ExchangeBuilder
anExchange(org.apache.camel.CamelContext context)
Create the exchange by setting the camel contextorg.apache.camel.Exchange
build()
Build up the exchange from the exchange builderExchangeBuilder
withBody(Object body)
Set the in message body on the exchangeExchangeBuilder
withHeader(String key, Object value)
Set the message header of the in message on the exchangeExchangeBuilder
withPattern(org.apache.camel.ExchangePattern pattern)
Set the message exchange pattern on the exchangeExchangeBuilder
withProperty(String key, Object value)
Set the exchange property
-
-
-
Method Detail
-
anExchange
public static ExchangeBuilder anExchange(org.apache.camel.CamelContext context)
Create the exchange by setting the camel context- Parameters:
context
- the camel context- Returns:
- exchange builder
-
withBody
public ExchangeBuilder withBody(Object body)
Set the in message body on the exchange- Parameters:
body
- the body- Returns:
- exchange builder
-
withHeader
public ExchangeBuilder withHeader(String key, Object value)
Set the message header of the in message on the exchange- Parameters:
key
- the key of the headervalue
- the value of the header- Returns:
- exchange builder
-
withPattern
public ExchangeBuilder withPattern(org.apache.camel.ExchangePattern pattern)
Set the message exchange pattern on the exchange- Parameters:
pattern
- exchange pattern- Returns:
- exchange builder
-
withProperty
public ExchangeBuilder withProperty(String key, Object value)
Set the exchange property- Parameters:
key
- the key of the exchange propertyvalue
- the value of the exchange property- Returns:
- exchange builder
-
build
public org.apache.camel.Exchange build()
Build up the exchange from the exchange builder- Returns:
- exchange
-
-