[
https://issues.apache.org/jira/browse/CAMEL-13141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-13141.
---------------------------------
Resolution: Fixed
> camel-api - Add API for advising routes
> ---------------------------------------
>
> Key: CAMEL-13141
> URL: https://issues.apache.org/jira/browse/CAMEL-13141
> Project: Camel
> Issue Type: New Feature
> Components: came-core
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 3.0.0, 3.0.0.M4
>
>
> We should likely add a nicer API for testing camel routes with the adviceWith
> functionality. Today you have to use a RouteReifier from camel-core. We
> should make a new API in camel-api and make it with a nicer name so its
> easier to understand and use.
> {code}
> RouteReifier.adviceWith(context.getRouteDefinitions().get(0),
> context, new RouteBuilder() {
> @Override
> public void configure() throws Exception {
> // intercept sending to mock:foo and do something else
> interceptSendToEndpoint("mock:foo")
> .skipSendToOriginalEndpoint()
> .to("log:foo")
> .to("mock:advised");
> }
> });
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)