public class MockExpressionClause<T> extends Object implements org.apache.camel.Expression, org.apache.camel.Predicate
Constructor and Description |
---|
MockExpressionClause(T result) |
Modifier and Type | Method and Description |
---|---|
T |
body()
An expression of an inbound message body
|
T |
body(BiFunction<Object,Map<String,Object>,Object> function)
A functional expression of an inbound message body and headers
|
T |
body(Class<?> expectedType)
An expression of an inbound message body converted to the expected type
|
<B> T |
body(Class<B> expectedType,
BiFunction<B,Map<String,Object>,Object> function)
A functional expression of an inbound message body converted to the expected type and headers
|
<B> T |
body(Class<B> expectedType,
Function<B,Object> function)
A functional expression of an inbound message body converted to the expected type
|
T |
body(Function<Object,Object> function)
A functional expression of an inbound message body
|
T |
body(Supplier<Object> supplier)
A functional expression of an inbound message body
|
T |
constant(Object value)
Specify the constant expression value.
|
<T> T |
evaluate(org.apache.camel.Exchange exchange,
Class<T> type) |
T |
exchange()
An expression of the exchange
|
T |
exchange(Function<org.apache.camel.Exchange,Object> function)
A functional expression of the exchange
|
T |
exchangeProperties()
An expression of the exchange properties
|
T |
exchangeProperty(String name)
An expression of an exchange property of the given name
|
T |
expression(org.apache.camel.Expression expression)
Specify an
Expression instance |
org.apache.camel.ExpressionFactory |
getExpressionType() |
org.apache.camel.Expression |
getExpressionValue() |
T |
groovy(String text)
Evaluates a Groovy expression
|
T |
header(String name)
An expression of an inbound message header of the given name
|
T |
headers()
An expression of the inbound headers
|
void |
init(org.apache.camel.CamelContext context) |
T |
inMessage()
An expression of an inbound message
|
T |
inMessage(Function<org.apache.camel.Message,Object> function)
A functional expression of an inbound message
|
T |
jsonpath(String text)
Evaluates a Json Path expression
|
T |
language(String language,
String expression)
Evaluates a given language name with the expression text
|
boolean |
matches(org.apache.camel.Exchange exchange) |
T |
message()
An expression of an inbound message
|
T |
message(Function<org.apache.camel.Message,Object> function)
A functional expression of an inbound message
|
T |
method(String bean)
Evaluates an expression using the bean language which
basically means the bean is invoked to determine the expression value.
|
T |
method(String bean,
String method)
Evaluates an expression using the bean language which
basically means the bean is invoked to determine the expression value.
|
T |
mvel(String text)
Evaluates a MVEL expression
|
T |
ognl(String text)
Evaluates an OGNL expression
|
T |
outBody(BiFunction<Object,Map<String,Object>,Object> function)
A functional expression of an outbound message body and headers
|
<B> T |
outBody(Class<B> expectedType,
BiFunction<B,Map<String,Object>,Object> function)
A functional expression of an outbound message body converted to the expected type and headers
|
<B> T |
outBody(Class<B> expectedType,
Function<B,Object> function)
A functional expression of an outbound message body converted to the expected type
|
T |
outBody(Function<Object,Object> function)
A functional expression of an outbound message body
|
T |
outMessage(Function<org.apache.camel.Message,Object> function)
A functional expression of an outbound message
|
T |
ref(String ref)
Evaluates a Ref expression
|
T |
simple(String text)
Evaluates a Simple expression
|
T |
spel(String text)
Evaluates a SpEL expression
|
T |
xpath(String text)
Evaluates an XPath expression
|
T |
xquery(String text)
Evaluates an XQuery expression
|
public MockExpressionClause(T result)
public T expression(org.apache.camel.Expression expression)
Expression
instancepublic T constant(Object value)
public T exchange()
public T exchange(Function<org.apache.camel.Exchange,Object> function)
public T message()
public T message(Function<org.apache.camel.Message,Object> function)
public T inMessage()
public T inMessage(Function<org.apache.camel.Message,Object> function)
public T outMessage(Function<org.apache.camel.Message,Object> function)
public T body()
public T body(Function<Object,Object> function)
public T body(BiFunction<Object,Map<String,Object>,Object> function)
public T body(Class<?> expectedType)
public <B> T body(Class<B> expectedType, Function<B,Object> function)
public <B> T body(Class<B> expectedType, BiFunction<B,Map<String,Object>,Object> function)
public T outBody(Function<Object,Object> function)
public T outBody(BiFunction<Object,Map<String,Object>,Object> function)
public <B> T outBody(Class<B> expectedType, Function<B,Object> function)
public <B> T outBody(Class<B> expectedType, BiFunction<B,Map<String,Object>,Object> function)
public T headers()
public T exchangeProperty(String name)
public T exchangeProperties()
public T method(String bean)
bean
- the name of the bean looked up the registrypublic T method(String bean, String method)
bean
- the name of the bean looked up the registrymethod
- the name of the method to invoke on the beanpublic T groovy(String text)
text
- the expression to be evaluatedpublic T jsonpath(String text)
text
- the expression to be evaluatedpublic T ognl(String text)
text
- the expression to be evaluatedpublic T mvel(String text)
text
- the expression to be evaluatedpublic T ref(String ref)
ref
- refers to the expression to be evaluatedpublic T spel(String text)
text
- the expression to be evaluatedpublic T simple(String text)
text
- the expression to be evaluatedpublic T xpath(String text)
text
- the expression to be evaluatedpublic T xquery(String text)
text
- the expression to be evaluatedpublic T language(String language, String expression)
language
- the name of the languageexpression
- the expression in the given languagepublic org.apache.camel.Expression getExpressionValue()
public org.apache.camel.ExpressionFactory getExpressionType()
public void init(org.apache.camel.CamelContext context)
init
in interface org.apache.camel.Expression
init
in interface org.apache.camel.Predicate
public <T> T evaluate(org.apache.camel.Exchange exchange, Class<T> type)
evaluate
in interface org.apache.camel.Expression
public boolean matches(org.apache.camel.Exchange exchange)
matches
in interface org.apache.camel.Predicate
Apache Camel