Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 67A531065E for ; Mon, 24 Nov 2014 11:47:19 +0000 (UTC) Received: (qmail 32861 invoked by uid 500); 24 Nov 2014 11:47:19 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 32815 invoked by uid 500); 24 Nov 2014 11:47:18 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 32803 invoked by uid 99); 24 Nov 2014 11:47:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Nov 2014 11:47:18 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 209.85.223.174 as permitted sender) Received: from [209.85.223.174] (HELO mail-ie0-f174.google.com) (209.85.223.174) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Nov 2014 11:47:14 +0000 Received: by mail-ie0-f174.google.com with SMTP id rl12so8605189iec.33 for ; Mon, 24 Nov 2014 03:46:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=GGv2OBVcoEAy7bQqfEYCWQ7fC8cGXj4cQoNgvDSmXRA=; b=lxbwfw2TryzjYDHRk0g/1tpvK4PGaFVF75nD9BDr/fgu8I/ipxds1Nvo6NslsE8uQk NmbZ/dgPO/D1LYzJxxS/2/lDOwu3XdM1qURHCxYCms3SbTAFI7x7zxnRE7OzHjVbeusW yBaH7VL9MXRZ40h4lxI39lMl9L1/RFdVQdUtXHx2sP0H8o866aB2etokhGXHNuG3Dd1v juYvcxhYpC7NYp/oIf1NpwIDt8rK9We4LOK0QsnNGeiu46MkL1qbuZMflqztpS45lTOa aAGzngOplpd5202Wcryjz3tHeiu1U23ezKWgVLxmQEEHWUnMpAZci8RHnlGoKxUGOo6g McZQ== X-Received: by 10.42.123.204 with SMTP id t12mr13056565icr.82.1416829614246; Mon, 24 Nov 2014 03:46:54 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.126.136 with HTTP; Mon, 24 Nov 2014 03:46:34 -0800 (PST) In-Reply-To: <1416679980179-5759497.post@n5.nabble.com> References: <1416679980179-5759497.post@n5.nabble.com> From: Claus Ibsen Date: Mon, 24 Nov 2014 12:46:34 +0100 Message-ID: Subject: Re: FTP Component configuration To: "users@camel.apache.org" Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org Hi No you cannot do that, you need to set the host/port etc in the uri, when you define the endpoint as an uri string. On Sat, Nov 22, 2014 at 7:13 PM, Atanas Shindov wrote: > Hi guys, > > After I've watched the Riding Camel > presentation by > James Strachan I tried to implement a route where all endpoints are FTP > based, but instead of configuring each FTP endpoint with hostname, port, and > login credentials, I wanted to configure all this just once on a > FtpComponent and have all these configurations automatically applied to all > my endpoints created with this component. I imagined that Camel would allow > me to do something like this: > > FtpComponentConfiguration config = new FtpComponentConfiguration(); > config.setHostname("localhost"); > config.setPort("21"); > config.setUsername("user"); > config.setPassword("password"); > FtpComponent ftp = new FtpComponent(config); > > context.addComponent("myFtp", ftp); > > And then my route's DSL would look like this: > > from(myFtp://directory/fromDirectory).to(myFtp://directory/toDirectory); > > However, it looks like that Camel's FTP component can't be used like this > (or at least I can't find a way to do it) which is very strange considering > the fact that James used namely FTP as an example to explain the idea behind > the components. I've used this approach for JMS - you configure a JMS > component just once with that's necessary (e.g. connection factory), and > then refer it in each JMS endpoint. > > Am I missing something or the current implementation of FTP does not allow > this? > > Best regards, > Atanas > > > > -- > View this message in context: http://camel.465427.n5.nabble.com/FTP-Component-configuration-tp5759497.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cibsen@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/