Class FTPCommand

java.lang.Object
   |
   +----FTPCommand

public class FTPCommand
extends Object
The FTPCommand class encapsulates our implementation of RFC 959.


Variable Index

 o Args
Any arguements to the Command
 o Command
The current FTP command (such as USER PASS DELE)
 o CurrentConnection
A Connection object for performing communications, etc.
 o Result
The numeric result code (such as 220) according to the RFC
 o ResultMsg
Any textual message to be sent with the response.

Constructor Index

 o FTPCommand()

Method Index

 o FTPUnknownCommand()
Called when an unknown or unimplemented command is requested
 o run()
Executes the appropriate method for the given command.
 o SendResponse(int, String)
Sends the result of the command to the user via the CurrentConnection.
 o SetCommandString(String)
Stores and parse the current command string.
 o toString()

Variables

 o CurrentConnection
 private Connection CurrentConnection
A Connection object for performing communications, etc.

See Also:
Connection
 o Command
 private String Command
The current FTP command (such as USER PASS DELE)

 o Args
 private String Args[]
Any arguements to the Command

 o Result
 private int Result
The numeric result code (such as 220) according to the RFC

 o ResultMsg
 private String ResultMsg
Any textual message to be sent with the response.

Constructors

 o FTPCommand
 public FTPCommand()

Methods

 o SetCommandString
 public void SetCommandString(String CommandString)
Stores and parse the current command string. Must be called before any other methods.

 o toString
 public String toString()
Overrides:
toString in class Object
 o run
 public void run()
Executes the appropriate method for the given command.

 o FTPUnknownCommand
 void FTPUnknownCommand()
Called when an unknown or unimplemented command is requested

 o SendResponse
 void SendResponse(int Code,
                   String Message)
Sends the result of the command to the user via the CurrentConnection.

Parameters:
Code - numeric result code
Message - any text corresponding to the numeric result code