You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "james strachan (JIRA)" <ji...@apache.org> on 2014/09/17 14:46:33 UTC

[jira] [Created] (CAMEL-7831) create a java8 only demo showing how to use lambda expressions for Predicate / Expression inside the Java DSL (using Message as a typesafe parameter)

james strachan created CAMEL-7831:
-------------------------------------

             Summary: create a java8 only demo showing how to use lambda expressions for Predicate / Expression inside the Java DSL (using Message as a typesafe parameter)
                 Key: CAMEL-7831
                 URL: https://issues.apache.org/jira/browse/CAMEL-7831
             Project: Camel
          Issue Type: New Feature
            Reporter: james strachan
             Fix For: 2.11.5


e.g. so folks can type things like
{code}
from("seda:cheese").
  filter(m -> m.getHeader("foo", int.class) > 5).
  map(m -> createPurchaseOrder(m.getBody(Invoice.class)).
  to("seda:bar");
{code}

Note if the current Predicate/Expression classes don't work as lambdas we could add a new interface with a single method to the DSL to ensure Java 8 does the right thing with lambdas



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