You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by jdavidw13 <jd...@gmail.com> on 2013/01/26 20:36:00 UTC

Reuse GenericFileProcessStrategy for FTPEndpoint and SftpEndpoing

Hello,

I have a GenericFileProcessStrategy that needs to operate on a set of files. 
However, these files originate from both SftpEndpoint and FTPEndpoint.  Has
anyone else run into the same scenario and had luck with creating an adaptor
for file operations around FTPFile and LsChannel, without resorting to
runtime type identification inside your GenericFileProcessStrategy
implementation?

Thanks :)



--
View this message in context: http://camel.465427.n5.nabble.com/Reuse-GenericFileProcessStrategy-for-FTPEndpoint-and-SftpEndpoing-tp5726352.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Reuse GenericFileProcessStrategy for FTPEndpoint and SftpEndpoing

Posted by Claus Ibsen <cl...@gmail.com>.
On Sat, Jan 26, 2013 at 8:36 PM, jdavidw13 <jd...@gmail.com> wrote:
> Hello,
>
> I have a GenericFileProcessStrategy that needs to operate on a set of files.
> However, these files originate from both SftpEndpoint and FTPEndpoint.  Has
> anyone else run into the same scenario and had luck with creating an adaptor
> for file operations around FTPFile and LsChannel, without resorting to
> runtime type identification inside your GenericFileProcessStrategy
> implementation?
>

Maybe you can use java inheritance for this.
And have a base class with common code, and then extend it for each ftp type.


> Thanks :)
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Reuse-GenericFileProcessStrategy-for-FTPEndpoint-and-SftpEndpoing-tp5726352.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen