Interface Expression

  • All Known Subinterfaces:

    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 Detail

      • evaluate

        <T> T evaluate​(Exchange exchange,
                       Class<T> type)
        Returns the value of the expression on the given exchange
        exchange - the message exchange on which to evaluate the expression
        type - the expected type of the evaluation result
        the value of the expression
      • init

        default void init​(CamelContext context)
        Initialize the expression with the given camel context
        context - the camel context