public class Interactive extends Object implements Runnable, ShellConsole
Modifier and Type | Field and Description |
---|---|
protected jline.ConsoleReader |
console |
protected static String |
currentCmdLine |
protected static ConsoleReaderFactory |
factory |
protected Shell |
shell |
CRLF
Constructor and Description |
---|
Interactive() |
Interactive(Shell shell,
InputStream in,
Writer out,
jline.Terminal term)
Used in GUI mode
|
Modifier and Type | Method and Description |
---|---|
void |
closeHistory() |
jline.ConsoleReader |
getConsole() |
static String |
getCurrentCmdLine() |
String |
getPrompt() |
Shell |
getShell() |
protected int |
handleError(Throwable t)
Return non zero to stop the application.
|
void |
loadHistory() |
void |
print(String msg) |
void |
println() |
void |
println(String msg) |
String |
readLine(String prompt,
Character mask) |
void |
removeHistory() |
static void |
reset() |
void |
run() |
static void |
setConsoleReaderFactory(ConsoleReaderFactory factory) |
static void |
setHandler(InteractiveShellHandler exitHandler) |
protected static ConsoleReaderFactory factory
protected static String currentCmdLine
protected jline.ConsoleReader console
public Interactive() throws IOException
IOException
public Interactive(Shell shell, InputStream in, Writer out, jline.Terminal term) throws IOException
shell
- in
- out
- IOException
public static void setConsoleReaderFactory(ConsoleReaderFactory factory)
public static void setHandler(InteractiveShellHandler exitHandler)
public static void reset()
public static String getCurrentCmdLine()
public jline.ConsoleReader getConsole()
protected int handleError(Throwable t) throws IOException
t
- IOException
public void print(String msg)
print
in interface ShellConsole
public void println(String msg)
println
in interface ShellConsole
public void println()
println
in interface ShellConsole
public String readLine(String prompt, Character mask)
readLine
in interface ShellConsole
public void loadHistory() throws IOException
IOException
public void closeHistory()
public void removeHistory()
Copyright © 2018 Nuxeo. All rights reserved.