camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: FTP Component configuration
Date Mon, 24 Nov 2014 11:46:34 GMT
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
<atanas.shindov@gmail.com> wrote:
> Hi guys,
>
> After I've watched the  Riding Camel
> <https://skillsmatter.com/skillscasts/2450-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/

Mime
View raw message