Package org.apache.camel.model.language
Class MethodCallExpression.Builder
java.lang.Object
org.apache.camel.model.language.ExpressionDefinition.AbstractBuilder<MethodCallExpression.Builder,MethodCallExpression>
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 for MethodCallExpression.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbeanTypeName(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).end()Ends the build of an expression.Name of method to callReference to an existing bean (bean id) to lookup in the registryScope of bean.scope(MethodCallExpression.Scope scope) Scope of bean.validate(boolean validate) Whether to validate the bean has the configured method.Whether to validate the bean has the configured method.Methods inherited from class org.apache.camel.model.language.TypedExpressionDefinition.AbstractBuilder
resultType, resultTypeNameMethods inherited from class org.apache.camel.model.language.ExpressionDefinition.AbstractBuilder
expression, id, predicate, trim, trim
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
method
Name of method to call -
ref
Reference to an existing bean (bean id) to lookup in the registry -
instance
-
beanType
-
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
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. -
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. -
validate
Whether to validate the bean has the configured method. -
validate
Whether to validate the bean has the configured method. -
end
Description copied from interface:LanguageBuilderEnds the build of an expression.- Returns:
- the expression fully built.
-