| com.coldcore.coloradoftp.command.Command
All known Subclasses: com.coldcore.coloradoftp.command.impl.CommandWrapper, com.coldcore.coloradoftp.command.impl.AbstractCommand,
Command | public interface Command (Code) | | User command.
This class is executed by a command processor and returns a reply which
if then send back to user.
In general there should be a separate implementation for every FTP command,
so every implementation knows how to handle one (and only one) FTP command.
This way commands can be easily replaced later.
Control connection can enter an INTERRUPT state. In INTERRUPT state user must
wait for a server reply and is not allowed to send anything in but the INTERRUPT
commands. As a result, there are two types of FTP commands: one will be processed
during the INTERRUPT state and the other will be dropped when a control connection
is in that state.
Some FTP commands put control connection into the INTERRUPT state which is then
cleared when the connection sends a reply. Such reply must refer to a command which
is allowed to clear the state or does not have a reference to a command.
There is a certain set of commands that must be processed during the INTERRUPT state:
ABOR, QUIT and STAT.
And usually only one command is allowed to clear that state: ABOR.
The rest of FTP commands should not bother with INTERRUPT state.
ColoradoFTP - The Open Source FTP Server (http://cftp.coldcore.com)
|
canClearInterruptState | public boolean canClearInterruptState()(Code) | | Test if reply to this command must clear INTERRUPT state of a connection
TRUE is it can, FALSE otherwise |
execute | public Reply execute()(Code) | | Execute the command
Reply to the command |
executeOnParent | public Reply executeOnParent(Command parent)(Code) | | Execute the command as part of the parent command (e.g. FEAT/HELP/OPTS)
Parameters: parent - Parent command Reply to the command or NULL to allow the parent to provide the default reply |
getConnection | public ControlConnection getConnection()(Code) | | Get control connection that submitted this command
Connection |
getName | public String getName()(Code) | | Get name of the command
Command name |
getParameter | public String getParameter()(Code) | | Get parameter of the command
Command parameter |
processInInterruptState | public boolean processInInterruptState()(Code) | | Test if this is command must be processed while a connection is in the INTERRUPT state
TRUE is it can be, FALSE otherwise |
setConnection | public void setConnection(ControlConnection connection)(Code) | | Set control connection that submitted this command
Parameters: connection - Connection |
setName | public void setName(String name)(Code) | | Set name of the command
Parameters: name - Command name |
setParameter | public void setParameter(String parameter)(Code) | | Set parameter of the command
Parameters: parameter - Command parameter |
|
|