You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ftpserver-users@mina.apache.org by Aidan Diffey <ai...@gmail.com> on 2010/11/29 09:37:52 UTC
Setting a FileObserver
Hello All.
I would like to create and set my own custom FileObserver so I can
keep a track of what has been downloaded. How can I do this?
Regards
Re: Setting a FileObserver
Posted by Niklas Gustavsson <ni...@protocol7.com>.
Sorry for the late reply
On Mon, Nov 29, 2010 at 9:37 AM, Aidan Diffey <ai...@gmail.com> wrote:
> I would like to create and set my own custom FileObserver so I can
> keep a track of what has been downloaded. How can I do this?
You should be able to do something like:
DefaultFtpServerContext ctx = new DefaultFtpServerContext();
DefaultFtpStatistics stats = new DefaultFtpStatistics();
stats.setFileObserver(new MyFileObserver());
ctx.setFtpStatistics(stats);
FtpServer server = new DefaultFtpServer(ctx);
server.start();
Please note that FileObserver is not currently part of our public API
and thus might change.
/niklas