public interface CommandHandler
CommandType| Modifier and Type | Method and Description |
|---|---|
boolean |
handleCommand(CliCommand command)
Handles the given command
|
void |
init(CliShell shell,
CliEnvironment env,
org.jline.terminal.Terminal terminal,
ExecutionContext exeContext)
sets-up the member variables
|
CliCommand |
parseLine(java.lang.String line)
Attempts to parse the given input string line into a
CliCommand of this handler's CommandType |
void |
printHelpMessage()
Prints to terminal the help message of the commands this handler handles
|
void init(CliShell shell, CliEnvironment env, org.jline.terminal.Terminal terminal, ExecutionContext exeContext)
shell: - the CliShell which uses this CommandHandlerenv: - the Shell's CliEnvironmentterminal: - the Terminal to print output and messagesexeContext: - the ExecutionContextCliCommand parseLine(java.lang.String line)
CliCommand of this handler's CommandTypeline: - input line stringCliCommand on success, null otherwiseboolean handleCommand(CliCommand command) throws CommandHandlerException
command: - input CliCommand to handleCommandHandlerException - if unrecoverable error happenedvoid printHelpMessage()