Yeah sure this is fine.

The processor interface will not change, it has been the same for 8 years now.

On Fri, Sep 11, 2015 at 4:56 PM, jdeane <jeremy.de...@gmail.com> wrote:
> In Java 8+ I can replace
>
>                         process(new Processor() {
>                                 public void process(Exchange exchange) {
>                                         String uuid = 
> UUID.randomUUID().toString();
>                                         
> exchange.getIn().setHeader("CareManagementID", uuid);
>                                 }
>                         }).
>
> with
>
>                         process((exchange) -> {
>                                 String uuid = UUID.randomUUID().toString();
>                                 
> exchange.getIn().setHeader("CareManagementID", uuid);
>                                 }).
>
> using a Java Lambda expression. This is because the Processor Interface
> adherers to Java 8+ definition of a Functional Interface (minus the optional
> Annotation).
>
> Does anyone have objections to this approach or believe that the Processor
> Interface would ever change in the future?
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Processor-Interface-and-Java-Lambda-Expression-tp5771449.html
> Sent from the Camel Development mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2nd edition:
https://www.manning.com/books/camel-in-action-second-edition

Reply via email to