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

Luca Burgazzoli commented on CAMEL-10140:
-----------------------------------------

It may be nice to have a ProcessClause here to do seomething like

{code:java}
.process()
    .exchange(e -> ... ) // Not needed but for consistency
.process()
    .body(Foo.class, b -> b.doSomethingOnFoo())
.process()
    .message(m -> {
        String h = m.getHeader("golden", String.class);
        m.getBody(Foo.class).doSomething(h);
    }
{code}

> Java 8 type safe process DSL
> ----------------------------
>
>                 Key: CAMEL-10140
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10140
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>
> See if we can get a process with lambda style that has a type-safe message 
> body type, so you can do something like
> {code}
> .process<Foo.class>( f -> { f.doSomethingOnFoo(); ... })
> .to("direct:bar");
> {code}
> And see if we can get a mini DSL for the process so you can also get access 
> to header/exchange etc.
> {code}
> .process<Foo.class>( f -> { 
>    String golden = header("golden", String.class);
>    f.doSomethingOnFoo(golden); 
> })
> .to("direct:bar");
> {code}



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

Reply via email to