|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.crsh.processor.term.Processor
public final class Processor
Field Summary | |
---|---|
(package private) Runnable |
CLOSE_TASK . |
private static Text |
CONTINUE_PROMPT . |
(package private) ProcessContext |
current . |
private StringBuffer |
lineBuffer . |
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 . |
Constructor Summary | |
---|---|
Processor(Term term, Shell shell) |
Method Summary | |
---|---|
void |
addListener(Closeable listener) |
(package private) void |
close() |
private void |
complete(CharSequence prefix) |
void |
flush() |
Class<Chunk> |
getConsumedType() Returns the class of the element generic type. |
boolean |
isWaitingEvent() |
(package private) boolean |
iterate() |
(package private) ProcessContext |
peekProcess() |
void |
provide(Chunk element) Provide an element. |
(package private) void |
readTerm() |
void |
run() |
(package private) void |
writePromptFlush() |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final Text CONTINUE_PROMPT
static final Runnable NOOP
final Runnable WRITE_PROMPT_TASK
final Runnable CLOSE_TASK
private final Runnable READ_TERM_TASK
final Logger log
final Term term
final Shell shell
final LinkedList<TermEvent> queue
final Object lock
ProcessContext current
Status status
volatile boolean waitingEvent
private final CloseableList listeners
private final StringBuffer lineBuffer
private final Object termLock
private boolean termReading
Constructor Detail |
---|
public Processor(Term term, Shell shell)
Method Detail |
---|
public boolean isWaitingEvent()
public void run()
run
in interface Runnable
boolean iterate() throws InterruptedException, IOException
InterruptedException
IOException
ProcessContext peekProcess()
void readTerm()
void close()
public void addListener(Closeable listener)
public Class<Chunk> getConsumedType()
Consumer
getConsumedType
in interface Consumer<Chunk>
public void provide(Chunk element) throws IOException
Consumer
provide
in interface Consumer<Chunk>
element
- the provided elementIOException
public void flush() throws IOException
flush
in interface Flushable
IOException
void writePromptFlush()
private void complete(CharSequence prefix)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |