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


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.

Reply via email to