Uploaded image for project: 'Camel'
  1. Camel
  2. 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)

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.18.0
    • examples
    • None
    • Unknown

    Description

      e.g. so folks can type things like

      from("seda:cheese").
        filter(m -> m.getHeader("foo", int.class) > 5).
        map(m -> createPurchaseOrder(m.getBody(Invoice.class)).
        to("seda:bar");
      

      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

      Attachments

        Issue Links

          Activity

            People

              lb Luca Burgazzoli
              jstrachan James Strachan
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: