public class CLI
extends java.lang.Object
implements java.lang.Runnable
Modifier and Type | Field and Description |
---|---|
protected CLIContext |
ctx |
Constructor and Description |
---|
CLI(Q2 q2,
java.io.InputStream in,
java.io.OutputStream rawout,
java.lang.String line,
boolean keepRunning,
boolean interactive) |
CLI(Q2 q2,
java.lang.String line,
boolean keepRunning) |
Modifier and Type | Method and Description |
---|---|
static void |
exec(java.io.InputStream in,
java.io.OutputStream out,
java.lang.String command) |
static java.lang.String |
exec(java.lang.String command) |
protected java.lang.String[] |
getCompletionPrefixes() |
Q2 |
getQ2() |
org.jline.reader.LineReader |
getReader() |
protected void |
handleExit() |
boolean |
isInteractive() |
protected void |
markStarted() |
protected void |
markStopped() |
void |
run() |
protected boolean |
running() |
void |
start() |
void |
stop() |
protected CLIContext ctx
public CLI(Q2 q2, java.lang.String line, boolean keepRunning) throws java.io.IOException
java.io.IOException
public CLI(Q2 q2, java.io.InputStream in, java.io.OutputStream rawout, java.lang.String line, boolean keepRunning, boolean interactive) throws java.io.IOException
java.io.IOException
protected boolean running()
protected void markStopped()
protected void markStarted()
protected java.lang.String[] getCompletionPrefixes()
protected void handleExit()
public void start() throws java.lang.Exception
java.lang.Exception
public void stop()
public void run()
run
in interface java.lang.Runnable
public Q2 getQ2()
public boolean isInteractive()
public org.jline.reader.LineReader getReader()
public static void exec(java.io.InputStream in, java.io.OutputStream out, java.lang.String command) throws java.lang.Exception
java.lang.Exception
public static java.lang.String exec(java.lang.String command) throws java.lang.Exception
java.lang.Exception