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 2009/04/17 11:37:34 UTC
[jira] Updated: (CAMEL-1533) Exchange interface - only one method
to easier impl as anonymous or in languages with closures such as Groovy
[ https://issues.apache.org/activemq/browse/CAMEL-1533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-1533:
-------------------------------
Fix Version/s: 2.0.0
[11:38] <jstrachan> yeah - lets go with the latter
[11:38] <jstrachan> an impl can always ignore the type
[11:38] <cibsen> yeah and you can pass in Object.class if you dont know/care
[11:38] <jstrachan> yeah
[11:38] <cibsen> finno
> Exchange interface - only one method to easier impl as anonymous or in languages with closures such as Groovy
> -------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-1533
> URL: https://issues.apache.org/activemq/browse/CAMEL-1533
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.0-M1
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Fix For: 2.0.0
>
>
> We should consider refactor the Exchange interface to only include one method.
> Currently it has the following two methods
> {code}
> /**
> * Returns the value of the expression on the given exchange
> *
> * @param exchange the message exchange on which to evaluate the expression
> * @return the value of the expression
> */
> Object evaluate(Exchange exchange);
> /**
> * Returns the value of the expression on the given exchange
> *
> * @param exchange the message exchange on which to evaluate the expression
> * @param type the expected type of the evaluation result
> * @return the value of the expression
> */
> <T> T evaluate(Exchange exchange, Class<T> type);
> {code}
> I suggest to keep only the last method, the one with the type parameter. You can always pass in Object.class if you dont care/know the type.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.