You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by kiran <ri...@gmail.com> on 2011/11/18 20:29:28 UTC
Using FTP
Hi,
Is it mandatory that to use FTP component in camel it needs to be chained
with a File component? for eg from ("file://) to ("ftp")? Can I chain
directly a bean output to ftp component like from(bean) to (ftp) or create a
direct end point to the ftp component?
If the second and third case is feasible, what is the input expected by FTP
component? File object, or String or InputStream?
Regards
Kiran
--
View this message in context: http://camel.465427.n5.nabble.com/Using-FTP-tp5005308p5005308.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Using FTP
Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Nov 18, 2011 at 8:29 PM, kiran <ri...@gmail.com> wrote:
> Hi,
>
> Is it mandatory that to use FTP component in camel it needs to be chained
> with a File component? for eg from ("file://) to ("ftp")? Can I chain
> directly a bean output to ftp component like from(bean) to (ftp) or create a
> direct end point to the ftp component?
>
> If the second and third case is feasible, what is the input expected by FTP
> component? File object, or String or InputStream?
>
You can chain the ftp component with whatever you want.
The input is expected to by convertable to InputStream.
Camel has built-in converters which can convert between the common types.
Mind that from(bean) does not make a good choice, as Camel will keep
call a method
on the been forever.
If you want to send a message to a Camel endpoint / route from Java
code, then look at
http://camel.apache.org/bean-integration.html
http://camel.apache.org/pojo-producing.html
http://camel.apache.org/producertemplate.html
> Regards
> Kiran
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Using-FTP-tp5005308p5005308.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--
Claus Ibsen
-----------------
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/