Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Wiki Markup
{snippet:id=e5|lang=java|url=activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/RouteBuilderTest.java}

Adding an Interceptor

Here is an example of adding a few custom InterceptorProcessor objects to a processing pipeline:

Wiki Markup
{snippet:id=e7|lang=java|url=activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/RouteBuilderTest.java}

When you start defining and interceptor stack with intercept(), you must follow up with the subsequent .target() so that the target of the interceptor stack is properly registered.