camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raul Kripalani (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-6648) Create a Fluent ProducerTemplate
Date Wed, 04 Sep 2013 00:59:51 GMT

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

Raul Kripalani commented on CAMEL-6648:
---------------------------------------

Looks promising! I'll take a look as soon as I get a chance. Thanks for
contributing.
On 3 Sep 2013 08:19, "Jan Matèrne (JIRA)" <jira@apache.org> wrote:


     [
https://issues.apache.org/jira/browse/CAMEL-6648?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel]

Jan Matèrne updated CAMEL-6648:
-------------------------------

    Attachment: CAMEL-6648.zip

I worked further on this and did a rework:

1. Instead of only focussing of a *ProducerTemplate I thought, that Claus
wants to have an API that allows the communication with Camel. So I thought
of a a building dealing with that whole communication.

2. While writing I thought it would be good to have more options to a build
the body. Finally this ends in a BodyBuilder (and I lought after appending
the object to build (body) and the name of the pattern (builder) ;)

3. While more thinking about the BodyBuilder I refactored that for use of
its own (and better testability).

FluentProducerTemplateTest.java, ProducerTemplateBuilder.java,
ProducerTemplateBuilderTest.java
following manner:
FluentProducerTemplate("activemq:queue:foo");

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA
administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

                
> Create a Fluent ProducerTemplate
> --------------------------------
>
>                 Key: CAMEL-6648
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6648
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-core
>            Reporter: Raul Kripalani
>            Assignee: Raul Kripalani
>             Fix For: 2.13.0
>
>         Attachments: CAMEL-6648.zip, FluentProducerTemplate.java, FluentProducerTemplateTest.java,
ProducerTemplateBuilder.java, ProducerTemplateBuilderTest.java
>
>
> Create a Fluent ProducerTemplate so that users can use it in the following manner:
> \\
> \\
> {code}
> // initialize ProducerTemplate with a default endpoint
> FluentProducerTemplate template = new FluentProducerTemplate("activemq:queue:foo"); 
> MyResponse response = 
>     template.newExchange().toDefaultEndpoint()
>             .withBody("this is slick")
>             .withHeader("MyHeader1", "HeaderValue")
>             .withHeader("MyHeader2", "HeaderValue2")
>             .resultAs(MyResponse.class)
>             .dispatchInOut();                 // or inOnly(), asyncInOut()
> {code}
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message