Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Camel Filter Bean when return value is false

$
0
0
Hello All,
I have a bean that will return a boolean of true or false. When the value
is false, I want to go in a camel filter. Filter looks for 'true', like
below:

<camel:filter>
<camel:method bean="accessControlProcessor" method="authorize" />
<camel:log message="access control returned true"/>
</camel:filter>

However, when this method returns false, I want to do something specific
like

<camel:filter>
<camel:method bean="accessControlProcessor" method="authorize" />

<camel:log message="Not authorized"/>
<camel:stop/>
</camel:filter>

I now I can set a header in my authorize method and run a camel choice on
that header. However, is there a way to do this using the simple language or
the content based router? I would rather not disrupt the processor with
camel specific code.

Thanks,
Yogesh

Viewing all articles
Browse latest Browse all 5648

Trending Articles