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
Ftplet
init
in interface Ftplet
ftpletContext
- The current FtpletContext
FtpException
public void destroy()
Ftplet
public FtpletResult onConnect(FtpSession session) throws FtpException, IOException
Ftplet
onConnect
in interface Ftplet
session
- The current FtpSession
FtpException
IOException
public FtpletResult onDisconnect(FtpSession session) throws FtpException, IOException
Ftplet
onDisconnect
in interface Ftplet
session
- The current FtpSession
FtpException
IOException
public FtpletResult beforeCommand(FtpSession session, FtpRequest request) throws FtpException, IOException
Ftplet
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.DISCONNECT
beforeCommand
in interface Ftplet
session
- The current sessionrequest
- The current requestFtpException
IOException
public FtpletResult afterCommand(FtpSession session, FtpRequest request, FtpReply reply) throws FtpException, IOException
Ftplet
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.DEFAULT
FtpletResult.DISCONNECT
: The server will immediately
disconnect the client.FtpletResult.DISCONNECT
afterCommand
in interface Ftplet
session
- 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.FtpException
IOException
public FtpletResult onLogin(FtpSession session, FtpRequest request) throws FtpException, IOException
session
- The current FtpSession
request
- The current FtpRequest
FtpException
IOException
public FtpletResult onDeleteStart(FtpSession session, FtpRequest request) throws FtpException, IOException
session
- The current FtpSession
request
- The current FtpRequest
FtpException
IOException
public FtpletResult onDeleteEnd(FtpSession session, FtpRequest request) throws FtpException, IOException
session
- The current FtpSession
request
- The current FtpRequest
FtpException
IOException
public FtpletResult onUploadStart(FtpSession session, FtpRequest request) throws FtpException, IOException
session
- The current FtpSession
request
- The current FtpRequest
FtpException
IOException
public FtpletResult onUploadEnd(FtpSession session, FtpRequest request) throws FtpException, IOException
session
- The current FtpSession
request
- The current FtpRequest
FtpException
IOException
public FtpletResult onDownloadStart(FtpSession session, FtpRequest request) throws FtpException, IOException
session
- The current FtpSession
request
- The current FtpRequest
FtpException
IOException
public FtpletResult onDownloadEnd(FtpSession session, FtpRequest request) throws FtpException, IOException
session
- The current FtpSession
request
- The current FtpRequest
FtpException
IOException
public FtpletResult onRmdirStart(FtpSession session, FtpRequest request) throws FtpException, IOException
session
- The current FtpSession
request
- The current FtpRequest
FtpException
IOException
public FtpletResult onRmdirEnd(FtpSession session, FtpRequest request) throws FtpException, IOException
session
- The current FtpSession
request
- The current FtpRequest
FtpException
IOException
public FtpletResult onMkdirStart(FtpSession session, FtpRequest request) throws FtpException, IOException
session
- The current FtpSession
request
- The current FtpRequest
FtpException
IOException
public FtpletResult onMkdirEnd(FtpSession session, FtpRequest request) throws FtpException, IOException
session
- The current FtpSession
request
- The current FtpRequest
FtpException
IOException
public FtpletResult onAppendStart(FtpSession session, FtpRequest request) throws FtpException, IOException
session
- The current FtpSession
request
- The current FtpRequest
FtpException
IOException
public FtpletResult onAppendEnd(FtpSession session, FtpRequest request) throws FtpException, IOException
session
- The current FtpSession
request
- The current FtpRequest
FtpException
IOException
public FtpletResult onUploadUniqueStart(FtpSession session, FtpRequest request) throws FtpException, IOException
session
- The current FtpSession
request
- The current FtpRequest
FtpException
IOException
public FtpletResult onUploadUniqueEnd(FtpSession session, FtpRequest request) throws FtpException, IOException
session
- The current FtpSession
request
- The current FtpRequest
FtpException
IOException
public FtpletResult onRenameStart(FtpSession session, FtpRequest request) throws FtpException, IOException
session
- The current FtpSession
request
- The current FtpRequest
FtpException
IOException
public FtpletResult onRenameEnd(FtpSession session, FtpRequest request) throws FtpException, IOException
session
- The current FtpSession
request
- The current FtpRequest
FtpException
IOException
public FtpletResult onSite(FtpSession session, FtpRequest request) throws FtpException, IOException
session
- The current FtpSession
request
- The current FtpRequest
FtpException
IOException
Copyright © 2003–2016 The Apache Software Foundation. All rights reserved.