camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmoulliard <cmoulli...@gmail.com>
Subject Explanation requested for when intercept defined outside of the route ?
Date Thu, 10 Jul 2008 10:15:38 GMT

Hi,

I see in the tests case of Camel that they are at least three different ways
to use the interceptor :

1) Add tracer as an interceptor (using the context)

getcontext().addInterceptorStrategy(InterceptStrategy);

where InterceptStrategy can be :
- Debugger : to debug and trace
- Tracer : to trace routes
- Instrumentation : for monitoring performance metrics

Remark : It should be interesting to have test case to see How to implement
InstrumentationInterceptStrategy ?

2) intercept is embedded in the routing

e.g.  from("seda:bar").intercept().to("log:hoho")

3) intercept is defined outside of the route

e.g.

intercept(header("foo").isEqualTo("bar")).to("mock:b").proceed();

from(direct:start").to("mock:a");

Questions :

- What is the difference between case 2) and 3) if there is one ?
- What will be intercepted in the case 3)  ?

Regards,

Charles

-- 
View this message in context: http://www.nabble.com/Explanation-requested-for-when-intercept-defined-outside-of-the-route---tp18379790s22882p18379790.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message