Return-Path: X-Original-To: apmail-camel-dev-archive@www.apache.org Delivered-To: apmail-camel-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6E61FD582 for ; Fri, 19 Oct 2012 10:14:04 +0000 (UTC) Received: (qmail 14916 invoked by uid 500); 19 Oct 2012 10:14:03 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 14668 invoked by uid 500); 19 Oct 2012 10:14:03 -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 14635 invoked by uid 99); 19 Oct 2012 10:14:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Oct 2012 10:14:02 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of james.strachan@gmail.com designates 209.85.212.169 as permitted sender) Received: from [209.85.212.169] (HELO mail-wi0-f169.google.com) (209.85.212.169) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Oct 2012 10:13:56 +0000 Received: by mail-wi0-f169.google.com with SMTP id hq4so63473wib.2 for ; Fri, 19 Oct 2012 03:13:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=wcROZi/JTrVFPWif+nBE14wlm/EY+qJePhBZ11eM3dI=; b=FqCe36k1q1C7hWW6GsBZB/ZGZ38963HS3JbJxf96IQ5/FjMb7k5MPPr3bam2XYQbw7 O2pVCWKqZnjsRopYXHgm/cGQ3NeFixPi6B8BjVmy5Psi2jLKRcp8Oqldc4YmLDpg9jnM sihv8sFsDBSTpyzGonkzZyHCxfVK+bkgtojaDSfnnw/I8zyGqE3EK9PNbQF7WxwhO8ke NdVePZzt0Sce2a/N/nBhCZ+XQJC+qluCdqKzL6YwaUQAUgM75UOg+/149Equ/v5riASe cKLTkliCtP/I/BcsoNMrimcR5VPD248cxXs+h60lk/hMX/HecBnJhwOPsxRMpi95qhFx m2mA== Received: by 10.180.87.34 with SMTP id u2mr2097901wiz.4.1350641615828; Fri, 19 Oct 2012 03:13:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.80.38 with HTTP; Fri, 19 Oct 2012 03:13:15 -0700 (PDT) From: James Strachan Date: Fri, 19 Oct 2012 11:13:15 +0100 Message-ID: Subject: adding Bindings to Endpoints... To: dev@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Inspired by the SwitchYard project and how it uses contracts in SCA, I thought I'd take a stab at adding something vaguely similar to Camel; to allow us to add bindings to an endpoint (e.g. ensuring a particular Data Format is used in or out of the endpoint, to add a validation step , add transactions or whatnot). It turned out to be really simple ;) there's not really much in the way of code; its more a new concept (rather like the introduction of Data Format a long time ago). I've tried to document what Bindings are and how they can be used - and when to use them or not... https://cwiki.apache.org/confluence/display/CAMEL/Binding I'm not sure how big a deal they are in general to Camel folks; if you only use an endpoint once inside a route and the route isn't used or shared by anything else, they are not that useful really. But I can see them being useful when folks have lots of endpoints; or wish to pass endpoints into and out of composite routes etc. So far there's only one Binding implementation ;) the DataFormatBinding which was pretty trivial to implement. http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/binding/DataFormatBinding.java?revision=1400019&view=markup Am sure we could hack up others for Java type conversion, XSD validation or WSDL contract enforcement or whatnot. We could also add a little bit of syntax sugar in the Java/XML DSLs to make them a little more DRY to use. Thoughts? -- James ------- Red Hat Email: jstracha@redhat.com Web: http://fusesource.com Twitter: jstrachan, fusenews Blog: http://macstrac.blogspot.com/ Open Source Integration