camel-issues mailing list archives

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


ASF GitHub Bot commented on CAMEL-10447:

GitHub user igarashitm opened a pull request:

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


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

    $ git pull CAMEL-10447-split-transformer-method

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

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 <>
Date:   2016-11-24T09:47:00Z

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


> Add contract based type awareness
> ---------------------------------
>                 Key: CAMEL-10447
>                 URL:
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-core
>            Reporter: Tomohisa Igarashi
>            Assignee: Tomohisa Igarashi
> Original proposal is available here:
> 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
> We've been discussing about this here in camel-dev:

This message was sent by Atlassian JIRA

View raw message