You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Johnny Walker <jo...@gmail.com> on 2012/03/16 07:59:41 UTC

How to create ftp/http listener dynamically

Hi,

We are finding the solution for create the ftp/http listener
dynamically,Let's say we need to deploy 2 camel ftp listener and 1 camel
http listener, and their corresponding configuration information such as ftp
folder name, retrieve rule, http host are stored in database, instead of
hardcode those configuration information in java code or camel-context.xml
file, could we have a central camel communication protocol manager which can
create/start/stop those listener(ftp, http, webservice,etc) based on
database configuration information?Our thought is to have a flexible way to
handle the communication protocols, like we do not need to hardcode the
configuration of ftp/http endpoint information and do not create the
separate bundle to handle different communication instance. 

Look forward to your advise! 


--
View this message in context: http://camel.465427.n5.nabble.com/How-to-create-ftp-http-listener-dynamically-tp5570099p5570099.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to create ftp/http listener dynamically

Posted by Willem Jiang <wi...@gmail.com>.
Just one note. For camel-ftp, there is no actual FTP server will be 
create by Camel. We still leverage a real FTP server at the end.

On 3/16/12 2:59 PM, Johnny Walker wrote:
> Hi,
>
> We are finding the solution for create the ftp/http listener
> dynamically,Let's say we need to deploy 2 camel ftp listener and 1 camel
> http listener, and their corresponding configuration information such as ftp
> folder name, retrieve rule, http host are stored in database, instead of
> hardcode those configuration information in java code or camel-context.xml
> file, could we have a central camel communication protocol manager which can
> create/start/stop those listener(ftp, http, webservice,etc) based on
> database configuration information?Our thought is to have a flexible way to
> handle the communication protocols, like we do not need to hardcode the
> configuration of ftp/http endpoint information and do not create the
> separate bundle to handle different communication instance.
>
> Look forward to your advise!
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-create-ftp-http-listener-dynamically-tp5570099p5570099.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang

Re: How to create ftp/http listener dynamically

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

You can add / remove / edit routes at runtime. There is API on
CamelContext for that.

If you use Java DSL then the RouteBuilder is just a java class, where
you can have getter/setter for
your hostname, port, username, folder name etc.

And then refer to these getters in the configure method in the RouteBuilder.

Then you can add your routes at runtime using the API on CamelContext.


If you use XML for routes, then see this example
http://camel.apache.org/loading-routes-from-xml-files.html


On Fri, Mar 16, 2012 at 7:59 AM, Johnny Walker <jo...@gmail.com> wrote:
> Hi,
>
> We are finding the solution for create the ftp/http listener
> dynamically,Let's say we need to deploy 2 camel ftp listener and 1 camel
> http listener, and their corresponding configuration information such as ftp
> folder name, retrieve rule, http host are stored in database, instead of
> hardcode those configuration information in java code or camel-context.xml
> file, could we have a central camel communication protocol manager which can
> create/start/stop those listener(ftp, http, webservice,etc) based on
> database configuration information?Our thought is to have a flexible way to
> handle the communication protocols, like we do not need to hardcode the
> configuration of ftp/http endpoint information and do not create the
> separate bundle to handle different communication instance.
>
> Look forward to your advise!
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-create-ftp-http-listener-dynamically-tp5570099p5570099.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/