org.apache.camel.builder
Class Builder

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

public final class Builder
extends Object

A helper class for including portions of the expression and predicate Java DSL

Version:

Method Summary
static ValueBuilder bean(Class<?> beanType, String method)
          Returns a bean expression value builder
static ValueBuilder bean(Object beanOrBeanRef)
          Returns a bean expression value builder.
static ValueBuilder bean(Object beanOrBeanRef, String method)
          Returns a bean expression value builder.
static ValueBuilder body()
          Returns a predicate and value builder for the inbound body on an exchange
static
<T> ValueBuilder
bodyAs(Class<T> type)
          Returns a predicate and value builder for the inbound message body as a specific type
static ValueBuilder constant(Object value)
          Returns a constant expression
static ValueBuilder exceptionMessage()
          Returns a predicate and value builder for the exception message on an exchange
static ValueBuilder exceptionStackTrace()
          Returns a predicate and value builder for the exception stacktrace on an exchange
static ValueBuilder faultBody()
          Returns a predicate and value builder for the fault body on an exchange
static
<T> ValueBuilder
faultBodyAs(Class<T> type)
          Returns a predicate and value builder for the fault message body as a specific type
static ValueBuilder header(String name)
          Returns a predicate and value builder for headers on an exchange
static ValueBuilder outBody()
          Returns a predicate and value builder for the outbound body on an exchange
static
<T> ValueBuilder
outBodyAs(Class<T> type)
          Returns a predicate and value builder for the outbound message body as a specific type
static ValueBuilder property(String name)
          Returns a predicate and value builder for properties on an exchange
static ValueBuilder regexReplaceAll(Expression content, String regex, Expression replacement)
          Returns an expression that replaces all occurrences of the regular expression with the given replacement
static ValueBuilder regexReplaceAll(Expression content, String regex, String replacement)
          Returns an expression that replaces all occurrences of the regular expression with the given replacement
static ValueBuilder sendTo(String uri)
          Returns an expression processing the exchange to the given endpoint uri.
static ValueBuilder simple(String value)
          Returns a simple expression
static ValueBuilder simple(String value, Class<?> resultType)
          Returns a simple expression
static ValueBuilder systemProperty(String name)
          Returns an expression for the given system property
static ValueBuilder systemProperty(String name, String defaultValue)
          Returns an expression for the given system property
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

bean

public static ValueBuilder bean(Object beanOrBeanRef)
Returns a bean expression value builder.

This method accepts dual parameters. Either an bean instance or a reference to a bean (String).

Parameters:
beanOrBeanRef - either an instanceof a bean or a reference to bean to lookup in the Registry
Returns:
the builder

bean

public static ValueBuilder bean(Object beanOrBeanRef,
                                String method)
Returns a bean expression value builder.

This method accepts dual parameters. Either an bean instance or a reference to a bean (String).

Parameters:
beanOrBeanRef - either an instanceof a bean or a reference to bean to lookup in the Registry
method - the method name
Returns:
the builder

bean

public static ValueBuilder bean(Class<?> beanType,
                                String method)
Returns a bean expression value builder

Parameters:
beanType - the bean class which will be invoked
method - name of method to invoke
Returns:
the builder

constant

public static ValueBuilder constant(Object value)
Returns a constant expression


simple

public static ValueBuilder simple(String value)
Returns a simple expression


simple

public static ValueBuilder simple(String value,
                                  Class<?> resultType)
Returns a simple expression


header

public static ValueBuilder header(String name)
Returns a predicate and value builder for headers on an exchange


property

public static ValueBuilder property(String name)
Returns a predicate and value builder for properties on an exchange


body

public static ValueBuilder body()
Returns a predicate and value builder for the inbound body on an exchange


bodyAs

public static <T> ValueBuilder bodyAs(Class<T> type)
Returns a predicate and value builder for the inbound message body as a specific type


outBody

public static ValueBuilder outBody()
Returns a predicate and value builder for the outbound body on an exchange


outBodyAs

public static <T> ValueBuilder outBodyAs(Class<T> type)
Returns a predicate and value builder for the outbound message body as a specific type


faultBody

public static ValueBuilder faultBody()
Returns a predicate and value builder for the fault body on an exchange


faultBodyAs

public static <T> ValueBuilder faultBodyAs(Class<T> type)
Returns a predicate and value builder for the fault message body as a specific type


systemProperty

public static ValueBuilder systemProperty(String name)
Returns an expression for the given system property


systemProperty

public static ValueBuilder systemProperty(String name,
                                          String defaultValue)
Returns an expression for the given system property


exceptionMessage

public static ValueBuilder exceptionMessage()
Returns a predicate and value builder for the exception message on an exchange


exceptionStackTrace

public static ValueBuilder exceptionStackTrace()
Returns a predicate and value builder for the exception stacktrace on an exchange


regexReplaceAll

public static ValueBuilder regexReplaceAll(Expression content,
                                           String regex,
                                           String replacement)
Returns an expression that replaces all occurrences of the regular expression with the given replacement


regexReplaceAll

public static ValueBuilder regexReplaceAll(Expression content,
                                           String regex,
                                           Expression replacement)
Returns an expression that replaces all occurrences of the regular expression with the given replacement


sendTo

public static ValueBuilder sendTo(String uri)
Returns an expression processing the exchange to the given endpoint uri.

Parameters:
uri - endpoint uri
Returns:
the builder


Apache CAMEL