camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-10447) Add contract based type awareness
Date Thu, 24 Nov 2016 12:51:58 GMT

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

ASF GitHub Bot commented on CAMEL-10447:
----------------------------------------

GitHub user igarashitm opened a pull request:

    https://github.com/apache/camel/pull/1306

    CAMEL-10447 Split ContractAdvice#doTransform() into smaller methods

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/igarashitm/camel CAMEL-10447-split-transformer-method

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/1306.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1306
    
----
commit 108993099375c4baae3287820dfe87681aceee1c
Author: Tomohisa Igarashi <tm.igarashi@gmail.com>
Date:   2016-11-24T09:47:00Z

    CAMEL-10447 Split ContractAdvice#doTransform() into smaller methods

----


> Add contract based type awareness
> ---------------------------------
>
>                 Key: CAMEL-10447
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10447
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-core
>            Reporter: Tomohisa Igarashi
>            Assignee: Tomohisa Igarashi
>
> Original proposal is available here:
> https://github.com/kcbabo/sandbox/blob/master/camel-metadata.md
> We'd like to propose adding contract based type awareness on the Camel Message Exchange.
It introduces following benefits to Camel users:
> * Static evaluation and validation of data types and interactions in an application.
> * Runtime evaluation of data types and interactions
> * The ability to start with a weak/dynamically typed application and move to a statically
typed application
> * Support for declarative transformation / automatic type conversion
> * Support for declarative validation of data types
> Let's see the declarative transformation example:
> {code:java}
> from("direct:abc")
>         .inputType("java:org.example.Order")
>     .to("direct:d")
>         .inputType("xml:{org.example}xmlOrder")
>         .outputType("urn:acme:orderAck")
>     .to("direct:e")
> {code}
> Instead of specifying transform().marshal() programmatically in the route, above declares
data type contract of the endpoints. This example means that the input message should be transformed
from *java:org.example.Order* to *xml:\{org.example\}xmlOrder* before it is sent to *direct:d*
from *direct:abc*.
> Once we add this feature, we can even validate if required transformer is declared along
the data type by some maven plugin or IDE at design time.
> The most important thing is that this feature is *completely optional*, so it doesn't
make any effect on existing Camel applications at all unless type declaration is explicitly
added.
> We've been discussing about this here in camel-dev:
> http://camel.465427.n5.nabble.com/Adding-type-awareness-in-Camel-route-td5787621.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message