Package org.apache.camel.component.mock
Class MockExpressionClauseSupport<T>
- java.lang.Object
-
- org.apache.camel.component.mock.MockExpressionClauseSupport<T>
-
- Direct Known Subclasses:
AssertionClause
public class MockExpressionClauseSupport<T> extends Object
A support class for building expression clauses. This implementation is a derived copy of the org.apache.camel.builder.ExpressionClauseSupport from camel-core, that are specialized for being used with the mock component and separated from camel-core.
-
-
Constructor Summary
Constructors Constructor Description MockExpressionClauseSupport(T result)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
body()
An expression of an inbound message bodyT
body(Class<?> expectedType)
An expression of an inbound message body converted to the expected typeprotected void
configureExpression(org.apache.camel.CamelContext camelContext, org.apache.camel.Expression expression)
T
constant(Object value)
Specify the constant expression value.protected org.apache.camel.Expression
createExpression(org.apache.camel.CamelContext camelContext)
T
exchange()
An expression of the exchangeT
exchangePattern()
An expression of the exchange patternT
exchangeProperties()
An expression of the exchange propertiesT
exchangeProperty(String name)
An expression of an exchange property of the given nameT
expression(org.apache.camel.Expression expression)
Specify anExpression
instanceorg.apache.camel.ExpressionFactory
getExpressionType()
org.apache.camel.Expression
getExpressionValue()
T
groovy(String text)
Evaluates a Groovy expressionT
header(String name)
An expression of an inbound message header of the given nameT
headers()
An expression of the inbound headersT
hl7terser(String text)
Evaluates an HL7 Terser expressionT
inMessage()
An expression of an inbound messageT
jsonpath(String text)
Evaluates a Json Path expressionT
language(String language, String expression)
Evaluates a given language name with the expression textT
language(org.apache.camel.ExpressionFactory expression)
Specify anExpressionFactory
instanceT
method(String bean)
T
ognl(String text)
Evaluates an OGNL expressionT
ref(String ref)
Evaluates aExpression
by looking up existingExpression
from theRegistry
void
setExpressionType(org.apache.camel.ExpressionFactory expressionType)
void
setExpressionValue(org.apache.camel.Expression expressionValue)
T
simple(String text)
Evaluates a Simple expressionT
spel(String text)
Evaluates an SpEL expressionT
xpath(String text)
Evaluates an XPath expressionT
xquery(String text)
Evaluates an XQuery expression
-
-
-
Constructor Detail
-
MockExpressionClauseSupport
public MockExpressionClauseSupport(T result)
-
-
Method Detail
-
expression
public T expression(org.apache.camel.Expression expression)
Specify anExpression
instance
-
language
public T language(org.apache.camel.ExpressionFactory expression)
Specify anExpressionFactory
instance
-
constant
public T constant(Object value)
Specify the constant expression value. Important: this is a fixed constant value that is only set once during starting up the route, do not use this if you want dynamic values during routing.
-
exchange
public T exchange()
An expression of the exchange
-
inMessage
public T inMessage()
An expression of an inbound message
-
body
public T body()
An expression of an inbound message body
-
body
public T body(Class<?> expectedType)
An expression of an inbound message body converted to the expected type
-
headers
public T headers()
An expression of the inbound headers
-
exchangePattern
public T exchangePattern()
An expression of the exchange pattern
-
exchangeProperty
public T exchangeProperty(String name)
An expression of an exchange property of the given name
-
exchangeProperties
public T exchangeProperties()
An expression of the exchange properties
-
method
public T method(String bean)
Evaluates an expression using the Parameters:bean
- the name of the bean looked up the registry- Returns:
- the builder to continue processing the DSL
-
method
public T method(String bean, String method)
Evaluates an expression using the Parameters:bean
- the name of the bean looked up the registrymethod
- the name of the method to invoke on the bean- Returns:
- the builder to continue processing the DSL
-
groovy
public T groovy(String text)
Evaluates a Groovy expression- Parameters:
text
- the expression to be evaluated- Returns:
- the builder to continue processing the DSL
-
jsonpath
public T jsonpath(String text)
Evaluates a Json Path expression- Parameters:
text
- the expression to be evaluated- Returns:
- the builder to continue processing the DSL
-
ognl
public T ognl(String text)
Evaluates an OGNL expression- Parameters:
text
- the expression to be evaluated- Returns:
- the builder to continue processing the DSL
-
mvel
public T mvel(String text)
Evaluates a MVEL expression- Parameters:
text
- the expression to be evaluated- Returns:
- the builder to continue processing the DSL
-
ref
public T ref(String ref)
Evaluates aExpression
by looking up existingExpression
from theRegistry
- Parameters:
ref
- refers to the expression to be evaluated- Returns:
- the builder to continue processing the DSL
-
spel
public T spel(String text)
Evaluates an SpEL expression- Parameters:
text
- the expression to be evaluated- Returns:
- the builder to continue processing the DSL
-
simple
public T simple(String text)
Evaluates a Simple expression- Parameters:
text
- the expression to be evaluated- Returns:
- the builder to continue processing the DSL
-
hl7terser
public T hl7terser(String text)
Evaluates an HL7 Terser expression- Parameters:
text
- the expression to be evaluated- Returns:
- the builder to continue processing the DSL
-
xpath
public T xpath(String text)
Evaluates an XPath expression- Parameters:
text
- the expression to be evaluated- Returns:
- the builder to continue processing the DSL
-
xquery
public T xquery(String text)
Evaluates an XQuery expression- Parameters:
text
- the expression to be evaluated- Returns:
- the builder to continue processing the DSL
-
language
public T language(String language, String expression)
Evaluates a given language name with the expression text- Parameters:
language
- the name of the languageexpression
- the expression in the given language- Returns:
- the builder to continue processing the DSL
-
getExpressionValue
public org.apache.camel.Expression getExpressionValue()
-
setExpressionValue
public void setExpressionValue(org.apache.camel.Expression expressionValue)
-
getExpressionType
public org.apache.camel.ExpressionFactory getExpressionType()
-
setExpressionType
public void setExpressionType(org.apache.camel.ExpressionFactory expressionType)
-
createExpression
protected org.apache.camel.Expression createExpression(org.apache.camel.CamelContext camelContext)
-
configureExpression
protected void configureExpression(org.apache.camel.CamelContext camelContext, org.apache.camel.Expression expression)
-
-