
public abstract class AbstractCommand extends Object implements CommandInterface
| Constructor and Description |
|---|
AbstractCommand() |
| Modifier and Type | Method and Description |
|---|---|
String |
getArg() |
String[] |
getArgs() |
FtpCommandCode |
getCode() |
String |
getCommand() |
FtpConfiguration |
getConfiguration() |
Object |
getObject() |
FtpSession |
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 newCommandArg)
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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecpublic final void setArgs(SessionInterface session, String command, String arg, Enum code)
CommandInterfacesetArgs in interface CommandInterfacepublic final void setExtraNextCommand(Enum extraNextCommand)
CommandInterfacesetExtraNextCommand in interface CommandInterfaceextraNextCommand - the extraNextCommand to setpublic final boolean isNextCommandValid(CommandInterface newCommandArg)
CommandInterfaceisNextCommandValid in interface CommandInterfacepublic final Object getObject()
getObject in interface CommandInterfacepublic final void setObject(Object object)
setObject in interface CommandInterfaceobject - the object to setpublic final String getArg()
getArg in interface CommandInterfacepublic final String[] getArgs()
getArgs in interface CommandInterfacepublic final int getValue(String argx) throws InvalidArgumentException
CommandInterfacegetValue in interface CommandInterfaceInvalidArgumentException - if the argument is not an
integerpublic final String getCommand()
getCommand in interface CommandInterfacepublic final boolean hasArg()
CommandInterfacehasArg in interface CommandInterfacepublic final FtpSession getSession()
getSession in interface CommandInterfacepublic final FtpConfiguration getConfiguration()
public final void invalidCurrentCommand()
CommandInterfaceinvalidCurrentCommand in interface CommandInterfacepublic final FtpCommandCode getCode()
getCode in interface CommandInterfaceCopyright © 2009–2022 Waarp. All rights reserved.