You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2011/03/04 12:45:36 UTC
[jira] Created: (CAMEL-3751) @Filter EIP to allow a bean to act as
the filter EIP pattern
@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
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
[jira] [Resolved] (CAMEL-3751) @Filter EIP to allow a bean to act
as the filter EIP pattern
Posted by "Ben O'Day (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ben O'Day resolved CAMEL-3751.
------------------------------
Resolution: Incomplete
agree with Claus, EIP bean annotations don't work for patterns with child outputs
> @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
[jira] [Commented] (CAMEL-3751) @Filter EIP to allow a bean to act
as the filter EIP pattern
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13025629#comment-13025629 ]
Claus Ibsen commented on CAMEL-3751:
------------------------------------
Yeah Ben. I thought of this last night when I saw that you have assigned this ticket. I also came to the same conclusion we can't really currently support EIP as annotations for EIPs which support child outputs (eg filter, splitter, aggregator).
If the filter always just stopped continue routing then it would be possible using the ROUTE_STOP indicator. But you can also filter only a part of a route.
{code}
from X
filter when ??
to A
to B
end // filter
to foo
to bar
{code}
eg in the route above to foo and to bar are outside the filter and always part of the routing.
So maybe we should mark this as "incomplete"?
> @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
[jira] [Commented] (CAMEL-3751) @Filter EIP to allow a bean to act
as the filter EIP pattern
Posted by "Ben O'Day (JIRA)" <ji...@apache.org>.
[ 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
[jira] [Assigned] (CAMEL-3751) @Filter EIP to allow a bean to act
as the filter EIP pattern
Posted by "Ben O'Day (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ben O'Day reassigned CAMEL-3751:
--------------------------------
Assignee: Ben O'Day
> @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