org.apache.ftpserver.ftplet
Class DefaultFtplet

java.lang.Object
  extended by org.apache.ftpserver.ftplet.DefaultFtplet
All Implemented Interfaces:
Ftplet

public class DefaultFtplet
extends java.lang.Object
implements Ftplet

Default ftplet implementation. All the callback method returns null. It is just an empty implementation. You can derive your ftplet implementation from this class.


Constructor Summary
DefaultFtplet()
           
 
Method Summary
 void destroy()
          Called by the servlet container to indicate to a ftplet that the ftplet is being taken out of service.
 void init(FtpletContext ftpletContext)
          Called by the ftplet container to indicate to a ftplet that the ftplet is being placed into service.
 FtpletEnum onAppendEnd(FtpSession session, FtpRequest request)
          File append success notification method.
 FtpletEnum onAppendStart(FtpSession session, FtpRequest request)
          File append request notification method.
 FtpletEnum onConnect(FtpSession session)
          Client connect notification method.
 FtpletEnum onDeleteEnd(FtpSession session, FtpRequest request)
          File delete success notification method.
 FtpletEnum onDeleteStart(FtpSession session, FtpRequest request)
          File delete request notification method.
 FtpletEnum onDisconnect(FtpSession session)
          Client disconnect notification method.
 FtpletEnum onDownloadEnd(FtpSession session, FtpRequest request)
          File download success notification method.
 FtpletEnum onDownloadStart(FtpSession session, FtpRequest request)
          File download request notification method.
 FtpletEnum onLogin(FtpSession session, FtpRequest request)
          Client successful login notification method.
 FtpletEnum onMkdirEnd(FtpSession session, FtpRequest request)
          Directory creation success notification method.
 FtpletEnum onMkdirStart(FtpSession session, FtpRequest request)
          Directory creation request notification method.
 FtpletEnum onRenameEnd(FtpSession session, FtpRequest request)
          Rename end notification method.
 FtpletEnum onRenameStart(FtpSession session, FtpRequest request)
          Rename start notification method.
 FtpletEnum onRmdirEnd(FtpSession session, FtpRequest request)
          Directory removal success notification method.
 FtpletEnum onRmdirStart(FtpSession session, FtpRequest request)
          Remove directory request notification method.
 FtpletEnum onSite(FtpSession session, FtpRequest request)
          SITE command notification method.
 FtpletEnum onUploadEnd(FtpSession session, FtpRequest request)
          File upload success notification method.
 FtpletEnum onUploadStart(FtpSession session, FtpRequest request)
          File upload request notification method.
 FtpletEnum onUploadUniqueEnd(FtpSession session, FtpRequest request)
          Unique file create success notification method.
 FtpletEnum onUploadUniqueStart(FtpSession session, FtpRequest request)
          Unique file create request notification method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFtplet

public DefaultFtplet()
Method Detail

init

public void init(FtpletContext ftpletContext)
          throws FtpException
Description copied from interface: Ftplet
Called by the ftplet container to indicate to a ftplet that the ftplet is being placed into service. The ftplet container calls the init method exactly once after instantiating the ftplet. The init method must complete successfully before the ftplet can receive any requests.

Specified by:
init in interface Ftplet
Throws:
FtpException

destroy

public void destroy()
Description copied from interface: Ftplet
Called by the servlet container to indicate to a ftplet that the ftplet is being taken out of service. This method is only called once all threads within the ftplet's service method have exited. After the ftplet container calls this method, callback methods will not be executed. If the ftplet initialization method fails, this method will not be called.

Specified by:
destroy in interface Ftplet

onConnect

public FtpletEnum onConnect(FtpSession session)
                     throws FtpException,
                            java.io.IOException
Description copied from interface: Ftplet
Client connect notification method.

Specified by:
onConnect in interface Ftplet
Throws:
FtpException
java.io.IOException

onDisconnect

public FtpletEnum onDisconnect(FtpSession session)
                        throws FtpException,
                               java.io.IOException
Description copied from interface: Ftplet
Client disconnect notification method. This is the last callback method.

Specified by:
onDisconnect in interface Ftplet
Throws:
FtpException
java.io.IOException

onLogin

public FtpletEnum onLogin(FtpSession session,
                          FtpRequest request)
                   throws FtpException,
                          java.io.IOException
Description copied from interface: Ftplet
Client successful login notification method. If the user has successfully authenticated, the FtpSession.getUser() method will return the user, otherwise it will return null.

Specified by:
onLogin in interface Ftplet
Throws:
FtpException
java.io.IOException

onDeleteStart

public FtpletEnum onDeleteStart(FtpSession session,
                                FtpRequest request)
                         throws FtpException,
                                java.io.IOException
Description copied from interface: Ftplet
File delete request notification method.

Specified by:
onDeleteStart in interface Ftplet
Throws:
FtpException
java.io.IOException

onDeleteEnd

public FtpletEnum onDeleteEnd(FtpSession session,
                              FtpRequest request)
                       throws FtpException,
                              java.io.IOException
Description copied from interface: Ftplet
File delete success notification method.

Specified by:
onDeleteEnd in interface Ftplet
Throws:
FtpException
java.io.IOException

onUploadStart

public FtpletEnum onUploadStart(FtpSession session,
                                FtpRequest request)
                         throws FtpException,
                                java.io.IOException
Description copied from interface: Ftplet
File upload request notification method.

Specified by:
onUploadStart in interface Ftplet
Throws:
FtpException
java.io.IOException

onUploadEnd

public FtpletEnum onUploadEnd(FtpSession session,
                              FtpRequest request)
                       throws FtpException,
                              java.io.IOException
Description copied from interface: Ftplet
File upload success notification method.

Specified by:
onUploadEnd in interface Ftplet
Throws:
FtpException
java.io.IOException

onDownloadStart

public FtpletEnum onDownloadStart(FtpSession session,
                                  FtpRequest request)
                           throws FtpException,
                                  java.io.IOException
Description copied from interface: Ftplet
File download request notification method.

Specified by:
onDownloadStart in interface Ftplet
Throws:
FtpException
java.io.IOException

onDownloadEnd

public FtpletEnum onDownloadEnd(FtpSession session,
                                FtpRequest request)
                         throws FtpException,
                                java.io.IOException
Description copied from interface: Ftplet
File download success notification method.

Specified by:
onDownloadEnd in interface Ftplet
Throws:
FtpException
java.io.IOException

onRmdirStart

public FtpletEnum onRmdirStart(FtpSession session,
                               FtpRequest request)
                        throws FtpException,
                               java.io.IOException
Description copied from interface: Ftplet
Remove directory request notification method.

Specified by:
onRmdirStart in interface Ftplet
Throws:
FtpException
java.io.IOException

onRmdirEnd

public FtpletEnum onRmdirEnd(FtpSession session,
                             FtpRequest request)
                      throws FtpException,
                             java.io.IOException
Description copied from interface: Ftplet
Directory removal success notification method.

Specified by:
onRmdirEnd in interface Ftplet
Throws:
FtpException
java.io.IOException

onMkdirStart

public FtpletEnum onMkdirStart(FtpSession session,
                               FtpRequest request)
                        throws FtpException,
                               java.io.IOException
Description copied from interface: Ftplet
Directory creation request notification method.

Specified by:
onMkdirStart in interface Ftplet
Throws:
FtpException
java.io.IOException

onMkdirEnd

public FtpletEnum onMkdirEnd(FtpSession session,
                             FtpRequest request)
                      throws FtpException,
                             java.io.IOException
Description copied from interface: Ftplet
Directory creation success notification method.

Specified by:
onMkdirEnd in interface Ftplet
Throws:
FtpException
java.io.IOException

onAppendStart

public FtpletEnum onAppendStart(FtpSession session,
                                FtpRequest request)
                         throws FtpException,
                                java.io.IOException
Description copied from interface: Ftplet
File append request notification method.

Specified by:
onAppendStart in interface Ftplet
Throws:
FtpException
java.io.IOException

onAppendEnd

public FtpletEnum onAppendEnd(FtpSession session,
                              FtpRequest request)
                       throws FtpException,
                              java.io.IOException
Description copied from interface: Ftplet
File append success notification method.

Specified by:
onAppendEnd in interface Ftplet
Throws:
FtpException
java.io.IOException

onUploadUniqueStart

public FtpletEnum onUploadUniqueStart(FtpSession session,
                                      FtpRequest request)
                               throws FtpException,
                                      java.io.IOException
Description copied from interface: Ftplet
Unique file create request notification method.

Specified by:
onUploadUniqueStart in interface Ftplet
Throws:
FtpException
java.io.IOException

onUploadUniqueEnd

public FtpletEnum onUploadUniqueEnd(FtpSession session,
                                    FtpRequest request)
                             throws FtpException,
                                    java.io.IOException
Description copied from interface: Ftplet
Unique file create success notification method.

Specified by:
onUploadUniqueEnd in interface Ftplet
Throws:
FtpException
java.io.IOException

onRenameStart

public FtpletEnum onRenameStart(FtpSession session,
                                FtpRequest request)
                         throws FtpException,
                                java.io.IOException
Description copied from interface: Ftplet
Rename start notification method.

Specified by:
onRenameStart in interface Ftplet
Throws:
FtpException
java.io.IOException

onRenameEnd

public FtpletEnum onRenameEnd(FtpSession session,
                              FtpRequest request)
                       throws FtpException,
                              java.io.IOException
Description copied from interface: Ftplet
Rename end notification method.

Specified by:
onRenameEnd in interface Ftplet
Throws:
FtpException
java.io.IOException

onSite

public FtpletEnum onSite(FtpSession session,
                         FtpRequest request)
                  throws FtpException,
                         java.io.IOException
Description copied from interface: Ftplet
SITE command notification method.

Specified by:
onSite in interface Ftplet
Throws:
FtpException
java.io.IOException


Copyright © 2003-2008 The Apache Software Foundation. All Rights Reserved.