org.apache.camel.builder
Class SimpleBuilder

java.lang.Object
  extended by org.apache.camel.builder.SimpleBuilder
All Implemented Interfaces:
Expression, Predicate

public class SimpleBuilder
extends Object
implements Predicate, Expression

Creates an Simple language builder.

This builder is available in the Java DSL from the RouteBuilder which means that using simple language for Expressions or Predicates is very easy with the help of this builder.

Version:
$Revision: 960448 $

Constructor Summary
SimpleBuilder(String text)
           
 
Method Summary
<T> T
evaluate(Exchange exchange, Class<T> type)
          Returns the value of the expression on the given exchange
 boolean matches(Exchange exchange)
          Evaluates the predicate on the message exchange and returns true if this exchange matches the predicate
static SimpleBuilder simple(String text)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleBuilder

public SimpleBuilder(String text)
Method Detail

simple

public static SimpleBuilder simple(String text)

matches

public boolean matches(Exchange exchange)
Description copied from interface: Predicate
Evaluates the predicate on the message exchange and returns true if this exchange matches the predicate

Specified by:
matches in interface Predicate
Parameters:
exchange - the message exchange
Returns:
true if the predicate matches

evaluate

public <T> T evaluate(Exchange exchange,
                      Class<T> type)
Description copied from interface: Expression
Returns the value of the expression on the given exchange

Specified by:
evaluate in interface Expression
Parameters:
exchange - the message exchange on which to evaluate the expression
type - the expected type of the evaluation result
Returns:
the value of the expression


Apache CAMEL