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 MuleAndJava <ni...@yahoo.com> on 2008/06/29 03:10:47 UTC

Versions of ftp server and Ftplet error callback method

Niklas - 

I recently started on a Java contract that is using Rana Battacharyya's old
ftp server code.  Was the Apache Mina FtpServer started from Rana's
codebase?   

Old developers on the project I'm working on now hacked into Rana's code
base to register listeners on ftp events that occurred and I would like to
throw out all that old code and simply register an FTPlet to listen for
events. I've noticed in the FTPlet callback methods there isn't a callback
or notification of when an error occurs in the FTP process on the ftp
server.  For example during an upload to the ftp server there is an
onUploadStart callback and a onUploadEnd callback which only gets called
back when a successful upload took place.  What about if there was an error
in the upload, is there a callback method that I am missing if an error took
place.  The reason I ask is that I would like to send a notification of some
kind letting my application know of the error.

Thanks
Nick
-- 
View this message in context: http://www.nabble.com/Versions-of-ftp-server-and-Ftplet-error-callback-method-tp18176471p18176471.html
Sent from the FTPServer - Development mailing list archive at Nabble.com.


Re: Versions of ftp server and Ftplet error callback method

Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Sun, Jun 29, 2008 at 3:10 AM, MuleAndJava <ni...@yahoo.com> wrote:
> I recently started on a Java contract that is using Rana Battacharyya's old
> ftp server code.  Was the Apache Mina FtpServer started from Rana's
> codebase?

Yes, that's correct :-)

> Old developers on the project I'm working on now hacked into Rana's code
> base to register listeners on ftp events that occurred and I would like to
> throw out all that old code and simply register an FTPlet to listen for
> events. I've noticed in the FTPlet callback methods there isn't a callback
> or notification of when an error occurs in the FTP process on the ftp
> server.  For example during an upload to the ftp server there is an
> onUploadStart callback and a onUploadEnd callback which only gets called
> back when a successful upload took place.  What about if there was an error
> in the upload, is there a callback method that I am missing if an error took
> place.

No, your analysis is correct. There was some discussion some time ago
on making the Ftplet API more generic, much like the Servlet API. My
plan, that will not be done for the next milestone is to change the
Ftplet interface to a completely generic API that is called before and
after each command. The old Ftplet interface API would be kept as a
abstract class, much like HttpServlet. As part of that change I would
also be happy to include a callback on an error, I think its a
reasonable condition to be aware of.  I've created an JIRA issue to
keep track of this change:
https://issues.apache.org/jira/browse/FTPSERVER-138

If you don't feel like waiting for that change, please provide a patch
and I'll have a look at including it in the mean time.

/niklas