@Language(value="bean")
public class BeanLanguage
extends org.apache.camel.support.LanguageSupport
implements org.apache.camel.spi.ScriptingLanguage, org.apache.camel.spi.PropertyConfigurer, org.apache.camel.StaticService
beanName.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 and Description |
---|
BeanLanguage() |
Modifier and Type | Method and Description |
---|---|
boolean |
configure(org.apache.camel.CamelContext camelContext,
Object target,
String name,
Object value,
boolean ignoreCase) |
org.apache.camel.Expression |
createExpression(String expression) |
org.apache.camel.Expression |
createExpression(String expression,
Object[] properties) |
org.apache.camel.Predicate |
createPredicate(String expression) |
org.apache.camel.Predicate |
createPredicate(String expression,
Object[] properties) |
<T> T |
evaluate(String script,
Map<String,Object> bindings,
Class<T> resultType) |
Object |
getBean() |
Class<?> |
getBeanType() |
String |
getMethod() |
String |
getRef() |
org.apache.camel.BeanScope |
getScope() |
void |
setBean(Object bean) |
void |
setBeanType(Class<?> beanType) |
void |
setMethod(String method) |
void |
setRef(String ref) |
void |
setScope(org.apache.camel.BeanScope scope) |
void |
start() |
void |
stop() |
getCamelContext, hasSimpleFunction, isDynamicResource, isSingleton, isStaticResource, loadResource, property, setCamelContext
public static final String LANGUAGE
public Object getBean()
public void setBean(Object bean)
public Class<?> getBeanType()
public void setBeanType(Class<?> beanType)
public String getRef()
public void setRef(String ref)
public String getMethod()
public void setMethod(String method)
public org.apache.camel.BeanScope getScope()
public void setScope(org.apache.camel.BeanScope scope)
public boolean configure(org.apache.camel.CamelContext camelContext, Object target, String name, Object value, boolean ignoreCase)
configure
in interface org.apache.camel.spi.PropertyConfigurer
public org.apache.camel.Predicate createPredicate(String expression)
createPredicate
in interface org.apache.camel.spi.Language
public org.apache.camel.Predicate createPredicate(String expression, Object[] properties)
createPredicate
in interface org.apache.camel.spi.Language
public org.apache.camel.Expression createExpression(String expression, Object[] properties)
createExpression
in interface org.apache.camel.spi.Language
public org.apache.camel.Expression createExpression(String expression)
createExpression
in interface org.apache.camel.spi.Language
public <T> T evaluate(String script, Map<String,Object> bindings, Class<T> resultType)
evaluate
in interface org.apache.camel.spi.ScriptingLanguage
public void start()
start
in interface org.apache.camel.Service
public void stop()
stop
in interface org.apache.camel.Service
Apache Camel