|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.language.bean.BeanLanguage
public class BeanLanguage
A bean language which uses a simple text notation to invoke methods on beans to evaluate predicates or expressions
The notation is essentiallybeanName.methodName
which is then invoked using the
beanName to lookup in the bean integration to bind the
Exchange
to the method arguments.
As of Camel 1.5 the bean language also supports invoking a provided bean by
its classname or the bean itself.
Constructor Summary | |
---|---|
BeanLanguage()
|
Method Summary | |
---|---|
static Expression |
bean(Class beanType,
String method)
Creates the expression for invoking the bean type. |
static Expression |
bean(Object bean,
String method)
Creates the expression for invoking the bean type. |
static Expression |
bean(String expression)
Creates the expression based on the string syntax. |
Expression<Exchange> |
createExpression(Object bean,
String method)
|
Expression<Exchange> |
createExpression(String expression)
Creates an expression based on the given string input |
Predicate<Exchange> |
createPredicate(String expression)
Creates a predicate based on the given string input |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BeanLanguage()
Method Detail |
---|
public static Expression bean(String expression)
expression
- the string syntax
public static Expression bean(Class beanType, String method)
beanType
- the bean type to invokemethod
- optional name of method to invoke for instance to avoid ambiguity
public static Expression bean(Object bean, String method)
bean
- the bean to invokemethod
- optional name of method to invoke for instance to avoid ambiguity
public Predicate<Exchange> createPredicate(String expression)
Language
createPredicate
in interface Language
expression
- the expression
public Expression<Exchange> createExpression(String expression)
Language
createExpression
in interface Language
expression
- the expression as a string input
public Expression<Exchange> createExpression(Object bean, String method)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |