public class Console extends Object
Modifier and Type | Method and Description |
---|---|
CompletionRegistration |
addCompletion(Completion completion)
Add a Completion to the completion list
|
void |
changeOutputStream(PrintStream output) |
void |
clear()
Clear a ansi terminal
|
void |
clearBufferAndDisplayPrompt() |
void |
continuous() |
void |
controlled() |
void |
currentProcessFinished(Process process) |
protected void |
finalize() |
AeshContext |
getAeshContext() |
String |
getBuffer()
Get the current console buffer line (no masking)
|
ConsoleCallback |
getConsoleCallback() |
ExportManager |
getExportManager() |
History |
getHistory()
Get the History object
|
protected CommandOperation |
getInput() |
String |
getInputLine()
Read from the input stream and return when user have pressed enter.
|
protected InputProcessor |
getInputProcessor() |
Prompt |
getPrompt() |
protected Settings |
getSettings() |
Shell |
getShell() |
TerminalSize |
getTerminalSize() |
boolean |
hasInput() |
boolean |
hasRunningProcesses() |
boolean |
isRunning() |
boolean |
isWaiting()
Returns true if the console is waiting for input and no foreground process is executing.
|
boolean |
isWaitingWithoutBackgroundProcess()
Returns true if the console is waiting for input and no process, foreground or background, is executing.
|
void |
pushToInputStream(String input) |
void |
putProcessInBackground(int pid)
Put the current process in the background
|
void |
putProcessInForeground(int pid)
Put the current process in the foreground
|
void |
setCompletionEnabled(boolean completionEnabled)
Runtime enable/disable of completion capabilities
|
void |
setConsoleCallback(ConsoleCallback consoleCallback) |
void |
setPrompt(Prompt prompt)
Set the current prompt.
|
void |
start() |
void |
stop() |
void |
updatePrompt(Prompt prompt)
Update the current prompt.
|
public Console(Settings settings)
protected void finalize() throws Throwable
protected Settings getSettings()
public TerminalSize getTerminalSize()
public History getHistory()
public void setPrompt(Prompt prompt)
prompt
- promptpublic void updatePrompt(Prompt prompt)
prompt
- public Prompt getPrompt()
public ExportManager getExportManager()
public void setConsoleCallback(ConsoleCallback consoleCallback)
public ConsoleCallback getConsoleCallback()
public void changeOutputStream(PrintStream output)
public boolean isWaiting()
public boolean isWaitingWithoutBackgroundProcess()
public void controlled()
public void continuous()
public void start()
public AeshContext getAeshContext()
public CompletionRegistration addCompletion(Completion completion)
completion
- comppublic void setCompletionEnabled(boolean completionEnabled)
completionEnabled
- public void stop()
public boolean isRunning()
public void clearBufferAndDisplayPrompt()
protected CommandOperation getInput() throws InterruptedException
InterruptedException
protected InputProcessor getInputProcessor()
public void putProcessInBackground(int pid)
public void putProcessInForeground(int pid)
public void pushToInputStream(String input)
public boolean hasInput()
public boolean hasRunningProcesses()
public String getInputLine() throws InterruptedException
InterruptedException
public Shell getShell()
public void currentProcessFinished(Process process)
public String getBuffer()
public void clear() throws IOException
IOException
- streamCopyright © 2019 JBoss, a division of Red Hat, Inc.. All Rights Reserved.