public abstract class BaseCommand extends Object implements Command
| Modifier | Constructor and Description |
|---|---|
protected |
BaseCommand(String name,
String help) |
protected |
BaseCommand(String name,
String help,
String argumentDescription) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
execute(String commandString,
Session context)
This is the main method that you need to override in order to implement a command.
|
protected String |
getArgPredicate(String commandString) |
static String[] |
getArgs(String commandString) |
HelpMessage |
getHelp() |
String |
getName()
Returns the name of the command in upper case.
|
public abstract void execute(String commandString, Session context) throws IOException, DropConnectionException
execute in interface CommandIOExceptionDropConnectionExceptionpublic HelpMessage getHelp()
public String getName()
CommandCopyright © 2006–2024. All rights reserved.