71.4.
${leftValue} OP rightValue
Operator | 描述 |
---|---|
== |
|
=~ |
|
> |
|
>= |
|
< |
|
⇐ |
|
!= |
|
!=~ |
|
contains |
|
!contains |
|
~~ |
|
!~~ |
|
regex |
|
!regex |
|
in |
|
!in |
|
is |
|
!is |
|
range |
|
!range |
|
startsWith |
|
|
|
endsWith |
|
|
|
Operator | 描述 |
---|---|
++ |
|
— |
|
\n |
|
\t |
|
\r |
|
\} |
|
Operator | 描述 |
---|---|
&& |
|
|
${leftValue} OP rightValue && ${leftValue} OP rightValue
${leftValue} OP rightValue || ${leftValue} OP rightValue
// exact equals match simple("${header.foo} == 'foo'") // ignore case when comparing, so if the header has value FOO this will match simple("${header.foo} =~ 'foo'") // here Camel will type convert '100' into the type of header.bar and if it is an Integer '100' will also be converter to an Integer simple("${header.bar} == '100'") simple("${header.bar} == 100") // 100 will be converter to the type of header.bar so we can do > comparison simple("${header.bar} > 100")
71.4.1.
simple("100 < ${header.bar}")
// testing for null simple("${header.baz} == null") // testing for not null simple("${header.baz} != null")
simple("${header.date} == ${date:now:yyyyMMdd}") simple("${header.type} == ${bean:orderService?method=getOrderType}")
simple("${header.title} contains 'Camel'")
simple("${header.number} regex '\\d{4}'")
simple("${header.type} in 'gold,silver'")
simple("${header.type} !in 'gold,silver'")
simple("${header.type} is 'java.lang.String'")
simple("${header.type} is 'String'")
simple("${header.number} range 100..199")
simple("${header.number} range '100..199'")
<from uri="seda:orders"> <filter> <simple>${header.type} == 'widget'</simple> <to uri="bean:orderService?method=handleWidget"/> </filter> </from>