In the definition of a route, it is frequently necessary to evaluate expressions and predicates. For example, if a route includes a filter processor, you need to evaluate a predicate to determine whether or not a message is to be allowed through the filter. To facilitate the evaluation of expressions and predicates, FUSE Mediation Router supports multiple language plug-ins, which can be accessed through XML elements.
Table 3.1 lists the elements that you can insert whenever the context demands an expression or a predicate. The content of the element must be a script written in the relevant language. At runtime, the return value of the script is read by the parent element.
Table 3.1. Elements for Expression and Predicate Languages
Element | Language | Description |
---|---|---|
simple
| N/A | A simple expression language, native to FUSE Mediation Router (see Simple). |
xpath
| XPath | The XPath language, which is used to select element, attribute, and text nodes from XML documents (see http://www.w3schools.com/xpath/default.asp). The XPath expression is applied to the current message. |
xquery
| XQuery | The XQuery language, which is an extension of XPath (see http://www.w3schools.com/xquery/default.asp). The XQuery expression is applied to the current message. |
sql
| JoSQL | The JoSQL language, which is a language for extracting and manipulating data from collections of Java objects, using a SQL-like syntax (see http://josql.sourceforge.net/). |
ognl
| OGNL | The OGNL (Object Graph Navigation Language) language (see http://www.ognl.org/). |
el
| EL | The Unified Expression Language (EL), originally developed as part of the JSP standard (see http://juel.sourceforge.net/). |
groovy
| Groovy | The Groovy scripting language (see http://groovy.codehaus.org/). |
javaScript
| JavaScript | The JavaScript scripting language (see http://developer.mozilla.org/en/docs/JavaScript), also known as ECMAScript (see http://www.ecmascript.org/). |
php
| PHP | The PHP scripting language (see http://www.php.net/). |
python
| Python | The Python scripting language (see http://www.python.org/). |
ruby
| Ruby | The Ruby scripting language (see http://www.ruby-lang.org/). |
bean
| Bean | Not really a language. The bean element is actually a
mechanism for integrating with Java beans. You use the bean
element to obtain an expression or predicate by invoking a method on a Java
bean. |