Section E.1. Structure of a Selector


E.1. Structure of a Selector

A message selector is made up of one or more Boolean expressions, joined together by logical operators and grouped using parentheses. For example:

 (<expression1> OR <expression2> AND <expression3>) OR     (<expression4> AND NOT <expression5>) . . .

A message selector is evaluated left to right in precedence order. So in this example, expression2 will be evaluated followed by expression3 (since AND has higher precedence than OR), and if they evaluate to false, then expression1 will be evaluated and so on.

Expressions are made up of literal values, identifiers (referring to either message headers or properties), conditional operators, and arithmetic operators.



Java Enterprise in a Nutshell
Java Enterprise in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596101422
EAN: 2147483647
Year: 2004
Pages: 269

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net