public abstract class AbstractCommandStream extends AbstractForkInputStream
input-stream
.Command
Modifier and Type | Field and Description |
---|---|
private byte[] |
currentBuffer |
private int |
currentPos |
private MasterProcessCommand |
lastCommand |
Constructor and Description |
---|
AbstractCommandStream() |
Modifier and Type | Method and Description |
---|---|
protected void |
beforeNextCommand()
Possibly waiting for next command (see
nextCommand() ) unless the stream is atomically
closed (see isClosed() returns true ) before this method has returned. |
protected abstract boolean |
canContinue()
|
protected MasterProcessCommand |
getLastCommand() |
protected void |
invalidateInternalBuffer()
Returns quietly and immediately.
|
protected abstract boolean |
isClosed() |
protected abstract Command |
nextCommand() |
int |
read()
Used by single thread in StreamFeeder class.
|
setFlushReceiverProvider, tryFlush
available, close, mark, markSupported, read, read, reset, skip
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
noop, provideNewTest, shutdown, skipSinceNextTest
private byte[] currentBuffer
private int currentPos
private volatile MasterProcessCommand lastCommand
protected abstract boolean isClosed()
protected abstract boolean canContinue()
protected void beforeNextCommand() throws java.io.IOException
nextCommand()
) unless the stream is atomically
closed (see isClosed()
returns true
) before this method has returned.java.io.IOException
protected abstract Command nextCommand()
protected final void invalidateInternalBuffer()
protected final MasterProcessCommand getLastCommand()
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException