camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-4797) DataFormat - unmarshal should allow to return Message or Exchange to make it more flexible
Date Mon, 19 Dec 2011 13:19:31 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-4797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13172256#comment-13172256
] 

Claus Ibsen commented on CAMEL-4797:
------------------------------------

People may want to return a Message or Exchange, if they want to unmarshal + add headers etc.
Currently this is not possible.
                
> DataFormat - unmarshal should allow to return Message or Exchange to make it more flexible
> ------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4797
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4797
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>             Fix For: 2.10
>
>
> The API of the unmarshal on DataFormat is
> {code}
>     Object unmarshal(Exchange exchange, InputStream stream) throws Exception;
> {code}
> The Object returned is by default the message body. But we should allow end user to return
also a
> - org.apache.camel.Message
> - org.apache.camel.Exchange
> If its a Message then use the message returned.
> If its a Exchange then copy the results from the exchange to the current exchange (normally
it would be the same instance, so its a noop operation)
> We supports this for the splitter, where people can return a List<Message> in the
split expression etc.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message