org.apache.camel.builder
Class ExchangeBuilder

java.lang.Object
  extended by org.apache.camel.builder.ExchangeBuilder

public final class ExchangeBuilder
extends Object


Constructor Summary
ExchangeBuilder(CamelContext context)
           
 
Method Summary
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExchangeBuilder

public ExchangeBuilder(CamelContext context)
Method Detail

anExchange

public static ExchangeBuilder anExchange(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 -
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 header
value - the value of the header
Returns:
exchange builder

withPattern

public ExchangeBuilder withPattern(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 property
value - the value of the exchange property
Returns:
exchange builder

build

public Exchange build()
Build up the exchange from the exchange builder

Returns:
exchange


Apache Camel