Predicates
Camel supports a pluggable interface called Predicate which can be used to integrate a dynamic predicate into Enterprise Integration Patterns such as when using the Message Filter.
Camel supports extensible Predicates using multiple Languages; the following languages are supported out of the box
- Bean Language for using Java for expressions
- Constant
- the unified EL from JSP and JSF
- Header
- JSonPath
- JXPath
- Mvel
- OGNL
- Ref Language
- ExchangeProperty / Property
- Scripting Languages such as
- Simple
- Spring Expression Language
- SQL
- Tokenizer
- XPath
- XQuery
- VTD-XML
Most of these languages is also supported used as Annotation Based Expression Language.
You can easily write your own plugin predicate by implementing the Predicate interface.
There are also a number of helper builders available such as the PredicateBuilder class
Using Predicates in your IDE
To 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.Language(s) |
Builder class to import |
---|---|
Scripting Languages such as BeanShell, JavaScript, Groovy, PHP, Python and Ruby |
|