Class FTPCommand
java.lang.Object
|
+----FTPCommand
- public class FTPCommand
- extends Object
The FTPCommand class encapsulates our implementation of RFC 959.
-
Args
- Any arguements to the Command
-
Command
- The current FTP command (such as USER PASS DELE)
-
CurrentConnection
- A Connection object for performing communications, etc.
-
Result
- The numeric result code (such as 220) according to the RFC
-
ResultMsg
- Any textual message to be sent with the response.
-
FTPCommand()
-
-
FTPUnknownCommand()
- Called when an unknown or unimplemented command is requested
-
run()
- Executes the appropriate method for the given command.
-
SendResponse(int, String)
- Sends the result of the command to the user via the CurrentConnection.
-
SetCommandString(String)
- Stores and parse the current command string.
-
toString()
-
CurrentConnection
private Connection CurrentConnection
- A Connection object for performing communications, etc.
- See Also:
- Connection
Command
private String Command
- The current FTP command (such as USER PASS DELE)
Args
private String Args[]
- Any arguements to the Command
Result
private int Result
- The numeric result code (such as 220) according to the RFC
ResultMsg
private String ResultMsg
- Any textual message to be sent with the response.
FTPCommand
public FTPCommand()
SetCommandString
public void SetCommandString(String CommandString)
- Stores and parse the current command string. Must be called before
any other methods.
toString
public String toString()
- Overrides:
- toString in class Object
run
public void run()
- Executes the appropriate method for the given command.
FTPUnknownCommand
void FTPUnknownCommand()
- Called when an unknown or unimplemented command is requested
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