Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 76305200C1C for ; Wed, 15 Feb 2017 15:39:33 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 73F55160B5E; Wed, 15 Feb 2017 14:39:33 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C0F5C160B46 for ; Wed, 15 Feb 2017 15:39:32 +0100 (CET) Received: (qmail 66077 invoked by uid 500); 15 Feb 2017 14:39:32 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 66065 invoked by uid 99); 15 Feb 2017 14:39:31 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Feb 2017 14:39:31 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 298341A0483 for ; Wed, 15 Feb 2017 14:39:31 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.379 X-Spam-Level: X-Spam-Status: No, score=0.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 2FMr7NAlscSq for ; Wed, 15 Feb 2017 14:39:29 +0000 (UTC) Received: from mail-ot0-f174.google.com (mail-ot0-f174.google.com [74.125.82.174]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id E801E5F5CC for ; Wed, 15 Feb 2017 14:39:28 +0000 (UTC) Received: by mail-ot0-f174.google.com with SMTP id 19so6807035oti.2 for ; Wed, 15 Feb 2017 06:39:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=O3ouduI1mqxgkJ3cGB3Dr34aIkYt1xE3qqEQhurHlGM=; b=E6bHu3pt1BxMztcLYyNoalKj0FhdPskYwBV09oTOfhBihEX68Py3XM4GJax8RRDSyO cwwgXanurJSzKIPzg169WU1P+CL6j9VdgtYjsUSG+JVXC/ZPyVJ0+lzWTkyBMYYTL5Gy aYg+z8x9hKvSp8ikOmerryAzYn1NhGXgSp7s1rMC72Zilm4ugB4++0XvSjizrrhjzISm iu2nAg6Oz008cD+hARE7RrS5PD4IxERWcsR1OXjdngrVttLfdyLucbo6odJ9G9oA9cY+ xJbiKMmCcxPyLsJlpC7rVcdfLR2gmTiWWg9eaTd9AP8ENm3NNEbXzesE8t3CWdmGYMYg ziow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=O3ouduI1mqxgkJ3cGB3Dr34aIkYt1xE3qqEQhurHlGM=; b=V2loodu6hMFvd3vMWR88bHOsg8cWatiHePGJTMj4XtIJ+oqJE3LaPDOLWt3W6JMzwt eJj0A0gRSkdwU7f9UVtkE3gmbIFJCshqJpIabdVWv0NOZqapXatHuIFuKdKwg+F6LHXi BpGyL8QHSQoFDK56X7oKo6lqTudm/CdBRcKsV1WHa9V6lN+y+uITK5quivWn9dh8DQB+ LJuHUwLjiIXTv2yGpCFS23EsPXq5YGkV0cqHS2dyKh+6xyEA+QF++cEf+ezDWnJiIiBu HYLNyd9urIjruY1NzRxEcBFJ4NJaobSbMJmIES3J4AKIdZHLnjWBaGlkLDlodM/c7euL qwkA== X-Gm-Message-State: AMke39miCwReS259ARY++ZFlRkpYzIWnLZFHYlQ7PUd4uDlbPzwdmOutF1Xd+yErIVU0BJj/MUIuxk1Zbkbnkg== X-Received: by 10.157.58.69 with SMTP id j63mr18372542otc.268.1487169561704; Wed, 15 Feb 2017 06:39:21 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.56.209 with HTTP; Wed, 15 Feb 2017 06:39:21 -0800 (PST) From: Luca Burgazzoli Date: Wed, 15 Feb 2017 15:39:21 +0100 Message-ID: Subject: Integration of Suppliers in Java 8 DSL To: dev@camel.apache.org Content-Type: text/plain; charset=UTF-8 archived-at: Wed, 15 Feb 2017 14:39:33 -0000 Hi, I'm working to make the Java DSL more Java 8 friedly adding missing pieces from the previous Java 8 round and one of the thing that was missing was the possibility to use Suppliers to provides objects to the routes. As today: from("direct:start") .idempotentConsumer() .header("messageId") .messageIdRepository(createRepo()) .to("mock:result"); With suppliers: from("direct:start") .idempotentConsumer() .header("messageId") .messageIdRepository(this::createRepo) .to("mock:result"); Adding that does not result in such a big improvement for the DSL but it adds some overhead to the underlying definitions as we may need to add additional variables to hold the suppliers and other stuffs to convert suppliers i.e. to expression clause so I'm unsure if we should add such things in 2.19 or maybe delay to 3.0 (where we may have the chance to do a deeper refactor and suppliers may play better), What do you think ? --- Luca Burgazzoli