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) |
protected 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 Command
IOException
DropConnectionException
public HelpMessage getHelp()
public String getName()
Command
Copyright © 2006–2016. All rights reserved.