|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CommandInterface
Interface for Command
Method Summary | |
---|---|
void |
exec()
Execute the command. |
String |
getArg()
|
String[] |
getArgs()
|
Enum<?> |
getCode()
|
String |
getCommand()
|
Object |
getObject()
|
SessionInterface |
getSession()
|
int |
getValue(String argx)
Get an integer value from argument |
boolean |
hasArg()
Does this command has an argument |
void |
invalidCurrentCommand()
Set the previous command as the new current command (used after a incorrect sequence of commands or unknown command). |
boolean |
isNextCommandValid(CommandInterface newCommand)
This function is called when a new command is received to check if this new command is positive according to the previous command and status. |
void |
setArgs(SessionInterface session,
String command,
String arg,
Enum code)
Set the Command from the args |
void |
setExtraNextCommand(Enum extraNextCommand)
This function is intend to allow to force USER->PASS->ACCT->CDW for instance |
void |
setObject(Object object)
|
Method Detail |
---|
void setArgs(SessionInterface session, String command, String arg, Enum code)
session
- command
- arg
- code
- void exec() throws CommandAbstractException
CommandAbstractException
- in case of an FTP Error occursvoid setExtraNextCommand(Enum extraNextCommand)
extraNextCommand
- the extraNextCommand to setboolean isNextCommandValid(CommandInterface newCommand)
newCommand
-
Object getObject()
void setObject(Object object)
object
- the object to setString getArg()
String[] getArgs()
int getValue(String argx) throws InvalidArgumentException
argx
-
InvalidArgumentException
- if the argument is not an integerString getCommand()
boolean hasArg()
SessionInterface getSession()
void invalidCurrentCommand()
Enum<?> getCode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |