Package org.apache.camel
Interface Expression
- All Known Subinterfaces:
StaticExpression
public interface Expression
An expression provides a plugin strategy for evaluating
expressions on a message exchange.
An expression should be thread-safe and be able to evaluate concurrently by different threads with different
exchanges.
Any initialization logic should be done by the
init(CamelContext)
method which allows to prepare the
expressions such as wiring in resources, pre-parsing and what else.- See Also:
-
Method Summary
Modifier and TypeMethodDescription<T> T
Returns the value of the expression on the given exchangedefault void
init
(CamelContext context) Initialize the expression with the given camel context
-
Method Details
-
evaluate
Returns the value of the expression on the given exchange- Parameters:
exchange
- the message exchange on which to evaluate the expressiontype
- the expected type of the evaluation result- Returns:
- the value of the expression
-
init
Initialize the expression with the given camel context- Parameters:
context
- the camel context
-