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 CommandInvocation
public CommandRegistry getCommandRegistry()
getCommandRegistry
in interface CommandInvocation
public Shell getShell()
getShell
in interface CommandInvocation
public void setPrompt(Prompt prompt)
CommandInvocation
setPrompt
in interface CommandInvocation
public Prompt getPrompt()
getPrompt
in interface CommandInvocation
public String getHelpInfo(String commandName)
getHelpInfo
in interface CommandInvocation
public void stop()
CommandInvocation
stop
in interface CommandInvocation
public AeshContext getAeshContext()
CommandInvocation
getAeshContext
in interface CommandInvocation
public CommandOperation getInput() throws InterruptedException
CommandInvocation
getInput
in interface CommandInvocation
InterruptedException
public String getInputLine() throws InterruptedException
CommandInvocation
getInputLine
in interface CommandInvocation
InterruptedException
public int getPid()
CommandInvocation
getPid
in interface CommandInvocation
public void putProcessInBackground()
CommandInvocation
putProcessInBackground
in interface CommandInvocation
public void putProcessInForeground()
CommandInvocation
putProcessInForeground
in interface CommandInvocation
public void executeCommand(String input)
CommandInvocation
executeCommand
in interface CommandInvocation
input
- command inputpublic void print(String msg)
CommandInvocation
print
in interface CommandInvocation
public void println(String msg)
CommandInvocation
println
in interface CommandInvocation
Copyright © 2017 JBoss, a division of Red Hat, Inc.. All Rights Reserved.