public class DefaultFtplet extends Object implements Ftplet
| Constructor and Description |
|---|
DefaultFtplet() |
| Modifier and Type | Method and Description |
|---|---|
FtpletResult |
afterCommand(FtpSession session,
FtpRequest request,
FtpReply reply)
Called by the ftplet container after a command has been executed by the
server.
|
FtpletResult |
beforeCommand(FtpSession session,
FtpRequest request)
Called by the ftplet container before a command is executed by the
server.
|
void |
destroy()
Called by the Ftplet 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.
|
FtpletResult |
onAppendEnd(FtpSession session,
FtpRequest request)
Override this method to intercept file appends after completion
|
FtpletResult |
onAppendStart(FtpSession session,
FtpRequest request)
Override this method to intercept file appends
|
FtpletResult |
onConnect(FtpSession session)
Client connect notification method.
|
FtpletResult |
onDeleteEnd(FtpSession session,
FtpRequest request)
Override this method to handle deletions after completion
|
FtpletResult |
onDeleteStart(FtpSession session,
FtpRequest request)
Override this method to intercept deletions
|
FtpletResult |
onDisconnect(FtpSession session)
Client disconnect notification method.
|
FtpletResult |
onDownloadEnd(FtpSession session,
FtpRequest request)
Override this method to handle downloads after completion
|
FtpletResult |
onDownloadStart(FtpSession session,
FtpRequest request)
Override this method to intercept downloads
|
FtpletResult |
onLogin(FtpSession session,
FtpRequest request)
Override this method to intercept user logins
|
FtpletResult |
onMkdirEnd(FtpSession session,
FtpRequest request)
Override this method to handle creation of directories after completion
|
FtpletResult |
onMkdirStart(FtpSession session,
FtpRequest request)
Override this method to intercept creation of directories
|
FtpletResult |
onRenameEnd(FtpSession session,
FtpRequest request)
Override this method to handle renames after completion
|
FtpletResult |
onRenameStart(FtpSession session,
FtpRequest request)
Override this method to intercept renames
|
FtpletResult |
onRmdirEnd(FtpSession session,
FtpRequest request)
Override this method to handle deletion of directories after completion
|
FtpletResult |
onRmdirStart(FtpSession session,
FtpRequest request)
Override this method to intercept deletion of directories
|
FtpletResult |
onSite(FtpSession session,
FtpRequest request)
Override this method to intercept SITE commands
|
FtpletResult |
onUploadEnd(FtpSession session,
FtpRequest request)
Override this method to handle uploads after completion
|
FtpletResult |
onUploadStart(FtpSession session,
FtpRequest request)
Override this method to intercept uploads
|
FtpletResult |
onUploadUniqueEnd(FtpSession session,
FtpRequest request)
Override this method to handle unique uploads after completion
|
FtpletResult |
onUploadUniqueStart(FtpSession session,
FtpRequest request)
Override this method to intercept unique uploads
|
public void init(FtpletContext ftpletContext) throws FtpException
Ftpletinit in interface FtpletftpletContext - The current FtpletContextFtpExceptionpublic void destroy()
Ftpletpublic FtpletResult onConnect(FtpSession session) throws FtpException, IOException
FtpletonConnect in interface Ftpletsession - The current FtpSessionFtpExceptionIOExceptionpublic FtpletResult onDisconnect(FtpSession session) throws FtpException, IOException
FtpletonDisconnect in interface Ftpletsession - The current FtpSessionFtpExceptionIOExceptionpublic FtpletResult beforeCommand(FtpSession session, FtpRequest request) throws FtpException, IOException
FtpletFtpletResult.DEFAULT: The server continues as normal and
executes the commandFtpletResult.NO_FTPLET: The server does not call any more
Ftplets before this command but continues execution of the command as
usualFtpletResult.SKIP: The server skips over execution of the
command. Note that the Ftplet is responsible for returning the
appropriate reply to the client, or the client might deadlock.FtpletResult.DISCONNECT: The server will immediately
disconnect the client.FtpletResult.DISCONNECTbeforeCommand in interface Ftpletsession - The current sessionrequest - The current requestFtpExceptionIOExceptionpublic FtpletResult afterCommand(FtpSession session, FtpRequest request, FtpReply reply) throws FtpException, IOException
FtpletFtpletResult.DEFAULT: The server continues as normalFtpletResult.NO_FTPLET: The server does not call any more
Ftplets before this command but continues as normalFtpletResult.SKIP: Same as FtpletResult.DEFAULTFtpletResult.DISCONNECT: The server will immediately
disconnect the client.FtpletResult.DISCONNECTafterCommand in interface Ftpletsession - The current sessionrequest - The current requestreply - the reply that was sent for this command. Implementations can
use this to check the reply code and thus determine if the
command was successfully processed or not.FtpExceptionIOExceptionpublic FtpletResult onLogin(FtpSession session, FtpRequest request) throws FtpException, IOException
session - The current FtpSessionrequest - The current FtpRequestFtpExceptionIOExceptionpublic FtpletResult onDeleteStart(FtpSession session, FtpRequest request) throws FtpException, IOException
session - The current FtpSessionrequest - The current FtpRequestFtpExceptionIOExceptionpublic FtpletResult onDeleteEnd(FtpSession session, FtpRequest request) throws FtpException, IOException
session - The current FtpSessionrequest - The current FtpRequestFtpExceptionIOExceptionpublic FtpletResult onUploadStart(FtpSession session, FtpRequest request) throws FtpException, IOException
session - The current FtpSessionrequest - The current FtpRequestFtpExceptionIOExceptionpublic FtpletResult onUploadEnd(FtpSession session, FtpRequest request) throws FtpException, IOException
session - The current FtpSessionrequest - The current FtpRequestFtpExceptionIOExceptionpublic FtpletResult onDownloadStart(FtpSession session, FtpRequest request) throws FtpException, IOException
session - The current FtpSessionrequest - The current FtpRequestFtpExceptionIOExceptionpublic FtpletResult onDownloadEnd(FtpSession session, FtpRequest request) throws FtpException, IOException
session - The current FtpSessionrequest - The current FtpRequestFtpExceptionIOExceptionpublic FtpletResult onRmdirStart(FtpSession session, FtpRequest request) throws FtpException, IOException
session - The current FtpSessionrequest - The current FtpRequestFtpExceptionIOExceptionpublic FtpletResult onRmdirEnd(FtpSession session, FtpRequest request) throws FtpException, IOException
session - The current FtpSessionrequest - The current FtpRequestFtpExceptionIOExceptionpublic FtpletResult onMkdirStart(FtpSession session, FtpRequest request) throws FtpException, IOException
session - The current FtpSessionrequest - The current FtpRequestFtpExceptionIOExceptionpublic FtpletResult onMkdirEnd(FtpSession session, FtpRequest request) throws FtpException, IOException
session - The current FtpSessionrequest - The current FtpRequestFtpExceptionIOExceptionpublic FtpletResult onAppendStart(FtpSession session, FtpRequest request) throws FtpException, IOException
session - The current FtpSessionrequest - The current FtpRequestFtpExceptionIOExceptionpublic FtpletResult onAppendEnd(FtpSession session, FtpRequest request) throws FtpException, IOException
session - The current FtpSessionrequest - The current FtpRequestFtpExceptionIOExceptionpublic FtpletResult onUploadUniqueStart(FtpSession session, FtpRequest request) throws FtpException, IOException
session - The current FtpSessionrequest - The current FtpRequestFtpExceptionIOExceptionpublic FtpletResult onUploadUniqueEnd(FtpSession session, FtpRequest request) throws FtpException, IOException
session - The current FtpSessionrequest - The current FtpRequestFtpExceptionIOExceptionpublic FtpletResult onRenameStart(FtpSession session, FtpRequest request) throws FtpException, IOException
session - The current FtpSessionrequest - The current FtpRequestFtpExceptionIOExceptionpublic FtpletResult onRenameEnd(FtpSession session, FtpRequest request) throws FtpException, IOException
session - The current FtpSessionrequest - The current FtpRequestFtpExceptionIOExceptionpublic FtpletResult onSite(FtpSession session, FtpRequest request) throws FtpException, IOException
session - The current FtpSessionrequest - The current FtpRequestFtpExceptionIOExceptionCopyright © 2003–2017 The Apache Software Foundation. All rights reserved.