|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crsh.processor.term.Processor
public final class Processor
| Field Summary | |
|---|---|
(package private) Runnable |
CLOSE
. |
(package private) ProcessContext |
current
. |
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
. |
private boolean |
reading
|
(package private) Shell |
shell
. |
(package private) Status |
status
. |
(package private) Term |
term
. |
private Object |
termLock
. |
(package private) boolean |
waitingEvent
A flag useful for unit testing to know when the thread is reading. |
(package private) Runnable |
WRITE_PROMPT
. |
| 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 |
|---|
static final Runnable NOOP
final Runnable WRITE_PROMPT
final Runnable CLOSE
private final Runnable READ_TERM
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 Object termLock
private boolean reading
| 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
IOExceptionProcessContext 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 element
IOException
public void flush()
throws IOException
flush in interface FlushableIOExceptionvoid writePromptFlush()
private void complete(CharSequence prefix)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||