Sure you can, there is also a loop [1] you could use for repetitive invocations. You can also define your own interceptor, which could also use a builder if you want to configure any kind of custom logic you might dream of. There's only so much we can provide out of the box.

Cheers,
Hadrian

[1] http://camel.apache.org/loop.html



On 11/07/2011 10:09 PM, xuhb wrote:
Thanks Willem:
    It seems the intercept is a extension of interceptor which enable user to 
define intercept logic with camel description language;
Although camel provide predefined control logic: stop route&  skip ;  But  if 
we need other executing logic, could I define it?

for example: could I define how many times the processor will be executed with 
intercept?


----- Original Message -----
From: "Willem Jiang"<willem.ji...@gmail.com>
To:<users@camel.apache.org>
Sent: Monday, November 07, 2011 6:44 PM
Subject: Re: Should camel extend the way of custom logical of camel route?


I think you can do the same thing with Intercept[1].

[1]http://camel.apache.org/intercept.html

On 11/7/11 1:51 PM, xuhb wrote:
When the application's execution logic is sophisticate , we can using endpoint 
and java bean  to define a custom logic ;

Here is a limitation: " only endpoint could be invoked in the custom execution 
logic", so how about to support another mechanism which enable user to define custom 
logical which could invoke processors defined in route (also endpoint can be invoked)?

Is this worth to do for camel?

Following is a proto-type (which is not good, because the implementation way 
violate the natural usage of camel's component);

1)extending a policy ,the policy enable user to retrieve the child processor 
with index or processor id; and the end-user could invoke the child processor 
as they want;
2) change Pipeline , enable populate all child processors;


--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang

Reply via email to