StubFtpServer - FTP Commands and CommandHandlers

The following table lists the main FTP server commands with their corresponding FTP client commands, and the StubFtpServer CommandHandler classes that implements support for the FTP server command. See the Javadoc for each CommandHandler class for information on how to customize its behavior through configuration, as well as what command invocation data is available.

FTP Server CommandFTP Client CommandCommandHandler Class(es)
ABOR--AborCommandHandler
ACCT--AcctCommandHandler
ALLO--AlloCommandHandler
APPEAPPENDAppeCommandHandler
CDUP--CdupCommandHandler
CWDCDCwdCommandHandler
DELEDELETEDeleCommandHandler
EPRT--EprtCommandHandler
EPSV--EpsvCommandHandler
HELPREMOTEHELPHelpCommandHandler
LISTDIR / LSListCommandHandler
MKDMKDIRMkdCommandHandler
MODE--ModeCommandHandler
NLST--NlstCommandHandler
NOOP--NoopCommandHandler
PASSUSERPassCommandHandler
PASV--PasvCommandHandler
PORT--PortCommandHandler
PWDPWDPwdCommandHandler
QUITQUIT / BYEQuitCommandHandler
REIN--ReinCommandHandler
REST--RestCommandHandler
RETRGET / RECVRetrCommandHandler FileRetrCommandHandler (1)
RMDRMDIRRmdCommandHandler
RNFRRENAMERnfrCommandHandler
RNTORENAMERntoCommandHandler
SITE--SiteCommandHandler
SMNT--SmntCommandHandler
STATSTATUSStatCommandHandler
STORPUT / SENDStorCommandHandler
STOU--StouCommandHandler
STRU--StruCommandHandler
SYST--SystCommandHandler
TYPEASCII / BINARY / TYPETypeCommandHandler
USERUSERUserCommandHandler

(1) An alternative to the default CommandHandler implementation. See its class Javadoc.

Special Command Handlers

There are also special CommandHandler classes defined (in the core package).

  • ConnectCommandHandler - Sends a 220 reply code after the initial connection to the server.
  • UnsupportedCommandHandler - Sends a 502 reply when an unrecognized/unsupported command name is sent from a client.