public final class Processor extends Object implements Runnable, ScreenContext
| Modifier and Type | Field and Description |
|---|---|
(package private) Runnable |
CLOSE_TASK
.
|
private static String |
CONTINUE_PROMPT
.
|
(package private) ProcessContext |
current
.
|
private LineParser |
lineBuffer
.
|
private MultiLineVisitor |
lineVisitor
.
|
private CloseableList |
listeners
.
|
(package private) Object |
lock
.
|
(package private) Logger |
log
.
|
(package private) static Runnable |
NOOP
.
|
(package private) LinkedList<TermEvent> |
queue
.
|
private Runnable |
READ_TERM_TASK
.
|
(package private) Shell |
shell
.
|
(package private) Status |
status
.
|
(package private) Term |
term
.
|
private Object |
termLock
.
|
private boolean |
termReading
.
|
(package private) boolean |
waitingEvent
A flag useful for unit testing to know when the thread is reading.
|
(package private) Runnable |
WRITE_PROMPT_TASK
.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(Closeable listener) |
Appendable |
append(char c) |
Appendable |
append(CharSequence s) |
Appendable |
append(CharSequence csq,
int start,
int end) |
Screenable |
append(Style style) |
(package private) void |
close() |
Screenable |
cls() |
private void |
complete(CharSequence prefix) |
void |
flush()
Flush the stream.
|
int |
getHeight()
Returns the screen height in chars.
|
int |
getWidth()
Returns the screen width in chars.
|
boolean |
isWaitingEvent() |
(package private) boolean |
iterate() |
(package private) ProcessContext |
peekProcess() |
(package private) void |
readTerm() |
void |
run() |
(package private) void |
writePromptFlush() |
private static final String CONTINUE_PROMPT
final Runnable WRITE_PROMPT_TASK
final Runnable CLOSE_TASK
private final Runnable READ_TERM_TASK
final LinkedList<TermEvent> queue
ProcessContext current
volatile boolean waitingEvent
private final CloseableList listeners
private final LineParser lineBuffer
private final MultiLineVisitor lineVisitor
private boolean termReading
public boolean isWaitingEvent()
boolean iterate() throws InterruptedException, IOException
InterruptedExceptionIOExceptionProcessContext peekProcess()
void readTerm()
void close()
public void addListener(Closeable listener)
public int getWidth()
ScreenContextgetWidth in interface ScreenContextpublic int getHeight()
ScreenContextgetHeight in interface ScreenContextpublic Appendable append(char c) throws IOException
append in interface AppendableIOExceptionpublic Appendable append(CharSequence s) throws IOException
append in interface AppendableIOExceptionpublic Appendable append(CharSequence csq, int start, int end) throws IOException
append in interface AppendableIOExceptionpublic Screenable append(Style style) throws IOException
append in interface ScreenableIOExceptionpublic Screenable cls() throws IOException
cls in interface ScreenableIOExceptionpublic void flush() throws IOException
ScreenContextflush in interface ScreenContextIOException - any io exceptionvoid writePromptFlush()
private void complete(CharSequence prefix)
Copyright © 2015 eXo Platform SAS. All Rights Reserved.