You could use a FileFilter implementation if you provide it with it's own connection to the same FTP server, using e.g. another <ftp:pool> to provide the connections. Just wire them together using plain Spring syntax in your xbean.xml file.
Your FileFilter's accept() method can than access the same FTP server to see if the matching done_ file is there before return true to the FTP poller.
I'm not sure i understand. I don't see <ftp:pool> documented anywhere. What attributes are available to set? What servicemix class does this correspond to? I assume my logic would go in custom Filter class accept() method. Here i'd need to utilize the standard FTPClient, etc. to connect back to the ftp server and do things on it.
Any xbean snippets that give the gist of what i'd be doing. Even if different bean class i could extrapolate.
The <ftp:pool/> element creates an org.apache.servicemix.ftp.FTPClientPool instance. If you give it an id, you can reference it from you CustomFilter using plain Spring syntax.
Probably missing some details, but just to give you an idea...
<ftp:poller filter="#CustomFilter"/> <bean id="CustomFilter" class="my.custom.FilterImpl"> <property name="pool"><ref bean="ConnectionPool"></ref> </bean> <ftp:pool id="ConnectionPool" host="server" username="myUser" password="myPassword"></ftp:pool>
Edited by: gertv on Jun 20, 2008 6:27 AM