public interface Ftplet
| 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 |
onConnect(FtpSession session)
Client connect notification method.
|
FtpletResult |
onDisconnect(FtpSession session)
Client disconnect notification method.
|
void init(FtpletContext ftpletContext) throws FtpException
ftpletContext - The current FtpletContextFtpExceptionvoid destroy()
FtpletResult beforeCommand(FtpSession session, FtpRequest request) throws FtpException, IOException
FtpletResult.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.DISCONNECTsession - The current sessionrequest - The current requestFtpExceptionIOExceptionFtpletResult afterCommand(FtpSession session, FtpRequest request, FtpReply reply) throws FtpException, IOException
FtpletResult.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.DISCONNECTsession - 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.FtpExceptionIOExceptionFtpletResult onConnect(FtpSession session) throws FtpException, IOException
session - The current FtpSessionFtpExceptionIOExceptionFtpletResult onDisconnect(FtpSession session) throws FtpException, IOException
session - The current FtpSessionFtpExceptionIOExceptionCopyright © 2003–2017 The Apache Software Foundation. All rights reserved.