public interface CommandInvocation
Modifier and Type | Method and Description |
---|---|
void |
executeCommand(String input)
This will push the input to the input stream where aesh will
parse it and execute it as a normal "user input".
|
AeshContext |
getAeshContext()
Get AeshContext
|
CommandRegistry |
getCommandRegistry() |
ControlOperator |
getControlOperator() |
String |
getHelpInfo(String commandName) |
CommandOperation |
getInput()
A blocking call that will return user input from the terminal
|
String |
getInputLine()
A blocking call that will return user input from the terminal
after the user has pressed enter.
|
int |
getPid()
The process id.
|
Command |
getPopulatedCommand(String commandLine)
Retrieve the command from a command line.
|
Prompt |
getPrompt() |
Shell |
getShell() |
boolean |
isEchoing() |
void |
print(String msg)
Print a message on console
|
void |
println(String msg)
Print a new line with a message on console;
|
void |
putProcessInBackground()
Put the current process in the background
|
void |
putProcessInForeground()
Put the current process in the foreground
|
void |
setEcho(boolean echo)
Set the Console to be echoing or not
|
void |
setPrompt(Prompt prompt)
Specify the prompt
|
void |
stop()
Stop the console and end the session
|
ControlOperator getControlOperator()
CommandRegistry getCommandRegistry()
Shell getShell()
void setPrompt(Prompt prompt)
Prompt getPrompt()
String getHelpInfo(String commandName)
void stop()
AeshContext getAeshContext()
CommandOperation getInput() throws InterruptedException
InterruptedException
String getInputLine() throws InterruptedException
InterruptedException
int getPid()
void putProcessInBackground()
void putProcessInForeground()
void executeCommand(String input)
input
- command inputvoid print(String msg)
msg
- void println(String msg)
msg
- boolean isEchoing()
void setEcho(boolean echo)
echo
- stateCommand getPopulatedCommand(String commandLine) throws CommandNotFoundException, CommandException, CommandLineParserException, OptionValidatorException
commandLine
- The input command.CommandNotFoundException
- If the
command is not found in the registry.CommandException
- If the Command is
not properly structured.CommandLineParserException
- If the line
parsing fails.OptionValidatorException
Copyright © 2017 JBoss by Red Hat. All rights reserved.