public interface CommandInterface
Modifier and Type | Method and Description |
---|---|
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) |
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()
Copyright © 2009–2020 Waarp. All rights reserved.