public final class AeshCommandInvocation extends Object implements CommandInvocation
| Constructor and Description |
|---|
AeshCommandInvocation(AeshConsoleImpl aeshConsole,
ControlOperator controlOperator,
int pid,
ConsoleCallback callback) |
| 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.
|
Prompt |
getPrompt() |
Shell |
getShell() |
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 |
setPrompt(Prompt prompt)
Specify the prompt
|
void |
stop()
Stop the console and end the session
|
public AeshCommandInvocation(AeshConsoleImpl aeshConsole, ControlOperator controlOperator, int pid, ConsoleCallback callback)
public ControlOperator getControlOperator()
getControlOperator in interface CommandInvocationpublic CommandRegistry getCommandRegistry()
getCommandRegistry in interface CommandInvocationpublic Shell getShell()
getShell in interface CommandInvocationpublic void setPrompt(Prompt prompt)
CommandInvocationsetPrompt in interface CommandInvocationpublic Prompt getPrompt()
getPrompt in interface CommandInvocationpublic String getHelpInfo(String commandName)
getHelpInfo in interface CommandInvocationpublic void stop()
CommandInvocationstop in interface CommandInvocationpublic AeshContext getAeshContext()
CommandInvocationgetAeshContext in interface CommandInvocationpublic CommandOperation getInput() throws InterruptedException
CommandInvocationgetInput in interface CommandInvocationInterruptedExceptionpublic String getInputLine() throws InterruptedException
CommandInvocationgetInputLine in interface CommandInvocationInterruptedExceptionpublic int getPid()
CommandInvocationgetPid in interface CommandInvocationpublic void putProcessInBackground()
CommandInvocationputProcessInBackground in interface CommandInvocationpublic void putProcessInForeground()
CommandInvocationputProcessInForeground in interface CommandInvocationpublic void executeCommand(String input)
CommandInvocationexecuteCommand in interface CommandInvocationinput - command inputpublic void print(String msg)
CommandInvocationprint in interface CommandInvocationpublic void println(String msg)
CommandInvocationprintln in interface CommandInvocationCopyright © 2024 JBoss by Red Hat. All rights reserved.