Package org.apache.camel.support
Class SingleInputTypedLanguageSupport
- java.lang.Object
-
- org.apache.camel.support.LanguageSupport
-
- org.apache.camel.support.TypedLanguageSupport
-
- org.apache.camel.support.SingleInputTypedLanguageSupport
-
- All Implemented Interfaces:
org.apache.camel.CamelContextAware,org.apache.camel.IsSingleton,org.apache.camel.spi.Language
public abstract class SingleInputTypedLanguageSupport extends TypedLanguageSupport
Base class forLanguageimplementations that support a result type and different sources of input data.
-
-
Field Summary
-
Fields inherited from class org.apache.camel.support.LanguageSupport
RESOURCE
-
-
Constructor Summary
Constructors Constructor Description SingleInputTypedLanguageSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.camel.ExpressioncreateExpression(String expression, Object[] properties)protected org.apache.camel.ExpressioncreateExpression(org.apache.camel.Expression source, String expression, Object[] properties)Creates an expression based on the input with properties.StringgetHeaderName()StringgetPropertyName()voidsetHeaderName(String headerName)Name of header to use as input, instead of the message bodyvoidsetPropertyName(String propertyName)Name of property to use as input, instead of the message body.-
Methods inherited from class org.apache.camel.support.TypedLanguageSupport
getResultType, setResultType
-
Methods inherited from class org.apache.camel.support.LanguageSupport
getCamelContext, hasSimpleFunction, isDynamicResource, isSingleton, isStaticResource, loadResource, property, setCamelContext
-
-
-
-
Method Detail
-
getHeaderName
public String getHeaderName()
-
setHeaderName
public void setHeaderName(String headerName)
Name of header to use as input, instead of the message body
-
getPropertyName
public String getPropertyName()
-
setPropertyName
public void setPropertyName(String propertyName)
Name of property to use as input, instead of the message body.It has a lower precedent than the name of header if both are set.
-
createExpression
public org.apache.camel.Expression createExpression(String expression, Object[] properties)
- Specified by:
createExpressionin interfaceorg.apache.camel.spi.Language- Overrides:
createExpressionin classTypedLanguageSupport
-
createExpression
protected org.apache.camel.Expression createExpression(org.apache.camel.Expression source, String expression, Object[] properties)Creates an expression based on the input with properties.- Parameters:
source- the expression allowing to retrieve the input data of the main expression.expression- the main expression to evaluate.properties- configuration properties (optimized as object array with hardcoded positions for properties)- Returns:
- the created expression
-
-