Package org.apache.camel.model.language
Class MethodCallExpression.Builder
- java.lang.Object
-
- org.apache.camel.model.language.TypedExpressionDefinition.AbstractBuilder<MethodCallExpression.Builder,MethodCallExpression>
-
- org.apache.camel.model.language.MethodCallExpression.Builder
-
- All Implemented Interfaces:
LanguageBuilder<MethodCallExpression>
- Enclosing class:
- MethodCallExpression
public static class MethodCallExpression.Builder extends TypedExpressionDefinition.AbstractBuilder<MethodCallExpression.Builder,MethodCallExpression>
Builder
is a specific builder forMethodCallExpression
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodCallExpression.Builder
beanType(Class<?> beanType)
MethodCallExpression.Builder
beanTypeName(String beanTypeName)
Class name (fully qualified) of the bean to use Will lookup in registry and if there is a single instance of the same type, then the existing bean is used, otherwise a new bean is created (requires a default no-arg constructor).MethodCallExpression
end()
Ends the build of an expression.T
expression(String expression)
The expression value in your chosen language syntaxT
id(String id)
Sets the id of this nodeMethodCallExpression.Builder
instance(Object instance)
MethodCallExpression.Builder
method(String method)
Name of method to callT
predicate(org.apache.camel.Predicate predicate)
MethodCallExpression.Builder
ref(String ref)
Reference to an existing bean (bean id) to lookup in the registryMethodCallExpression.Builder
scope(String scope)
Scope of bean.T
trim(boolean trim)
Whether to trim the value to remove leading and trailing whitespaces and line breaksT
trim(String trim)
Whether to trim the value to remove leading and trailing whitespaces and line breaks-
Methods inherited from class org.apache.camel.model.language.TypedExpressionDefinition.AbstractBuilder
resultType, resultTypeName
-
-
-
-
Method Detail
-
method
public MethodCallExpression.Builder method(String method)
Name of method to call
-
ref
public MethodCallExpression.Builder ref(String ref)
Reference to an existing bean (bean id) to lookup in the registry
-
instance
public MethodCallExpression.Builder instance(Object instance)
-
beanType
public MethodCallExpression.Builder beanType(Class<?> beanType)
-
beanTypeName
public MethodCallExpression.Builder beanTypeName(String beanTypeName)
Class name (fully qualified) of the bean to use Will lookup in registry and if there is a single instance of the same type, then the existing bean is used, otherwise a new bean is created (requires a default no-arg constructor).
-
scope
public MethodCallExpression.Builder scope(String scope)
Scope of bean. When using singleton scope (default) the bean is created or looked up only once and reused for the lifetime of the endpoint. The bean should be thread-safe in case concurrent threads is calling the bean at the same time. When using request scope the bean is created or looked up once per request (exchange). This can be used if you want to store state on a bean while processing a request and you want to call the same bean instance multiple times while processing the request. The bean does not have to be thread-safe as the instance is only called from the same request. When using prototype scope, then the bean will be looked up or created per call. However in case of lookup then this is delegated to the bean registry such as Spring or CDI (if in use), which depends on their configuration can act as either singleton or prototype scope. So when using prototype scope then this depends on the bean registry implementation.
-
end
public MethodCallExpression end()
Description copied from interface:LanguageBuilder
Ends the build of an expression.- Returns:
- the expression fully built.
-
id
public T id(String id)
Sets the id of this node
-
trim
public T trim(String trim)
Whether to trim the value to remove leading and trailing whitespaces and line breaks
-
trim
public T trim(boolean trim)
Whether to trim the value to remove leading and trailing whitespaces and line breaks
-
expression
public T expression(String expression)
The expression value in your chosen language syntax
-
predicate
public T predicate(org.apache.camel.Predicate predicate)
-
-