[ https://issues.apache.org/jira/browse/CAMEL-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13025603#comment-13025603 ]
Ben O'Day commented on CAMEL-3751: ---------------------------------- hmmm, because bean() behaves like pipeline, it appears that we need to short-circuit the pipeline (how?) or make the bean() support child processor behavior (like filter(), etc). The Exchange.ROUTE_STOP will short-circuit routing, but neglects the rest of the route. Any other ideas on this? At least we can support bean driven filtering using like this... from("direct:headerTest") .filter().method(MyBean.class, "isGoldCustomer").to("mock:result").end() .to("mock:end"); ... public static class MyBean { public boolean isGoldCustomer(@Header("level") String level) { return level.equals("gold"); } } > @Filter EIP to allow a bean to act as the filter EIP pattern > ------------------------------------------------------------ > > Key: CAMEL-3751 > URL: https://issues.apache.org/jira/browse/CAMEL-3751 > Project: Camel > Issue Type: New Feature > Components: camel-core > Affects Versions: 2.6.0 > Reporter: Claus Ibsen > Assignee: Ben O'Day > > There is a JIRA ticket for more EIPs as annotations. > But the Filter EIP is simple, so we should probably just add it so you can do > {code} > @Filter > public boolean isGoldCustomer(@Header("id") int id) { > ... > } > {code} -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira