Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the early version of the new website
https://camel.apache.org/staging/
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.
ExpressionsExpressions and Predicates can then be used to create the various Enterprise Integration Patterns in the DSL or Xml Configuration like the Recipient List. APIIf you are outside of the DSL and want to create your own expressions you can either implement the Expression interface, reuse one of the other builders or try the ExpressionBuilder class. ExpressionThe API for a Camel Expression is defined in the public interface Expression { /** * Returns the value of the expression on the given exchange * * @param exchange the message exchange on which to evaluate the expression * @param type the expected type of the evaluation result * @return the value of the expression */ <T> T evaluate(Exchange exchange, Class<T> type); } PredicateThe API for a Camel Predicate is defined in the public interface Predicate { /** * Evaluates the predicate on the message exchange and returns true if this * exchange matches the predicate * * @param exchange the message exchange * @return true if the predicate matches */ boolean matches(Exchange exchange); } Expression LanguagesThe following languages are supported out of the box
Most of these languages is also supported used as Annotation Based Expression Language. Using Expressions in your IDETo use different expression and predicates in your IDE you need to perform a static import of the builder class for the language(s) you wish to use.
See Also |