public static interface ListeningProcessExecutor.LaunchedProcess
ListeningProcessExecutor
.Modifier and Type | Field and Description |
---|---|
static int |
BUFFER_CAPACITY
The capacity of each I/O buffer, in bytes.
|
Modifier and Type | Method and Description |
---|---|
void |
closeStdin(boolean force)
Closes the stdin of the process.
|
boolean |
hasPendingWrites()
Returns
true if the process has any data queued to write to stdin, false
otherwise. |
boolean |
isRunning()
Returns
true if the process is running, false otherwise. |
void |
wantWrite()
Invoke this to indicate you wish to write to the launched process's stdin.
|
void |
writeStdin(ByteBuffer buffer)
Invoke this to directly write data to the launched process's stdin.
|
static final int BUFFER_CAPACITY
void wantWrite()
Your ListeningProcessExecutor.ProcessListener.onStdinReady(ByteBuffer)
method will be invoked
asynchronously when the process is ready to receive data on stdin.
void writeStdin(ByteBuffer buffer)
If you need to be notified when the write to stdin completes, use wantWrite()
and
ListeningProcessExecutor.ProcessListener.onStdinReady(ByteBuffer)
instead.
void closeStdin(boolean force)
If force
is true
, then pending writes to stdin are discarded. Otherwise,
waits for pending writes to flush, then closes stdin.
boolean hasPendingWrites()
true
if the process has any data queued to write to stdin, false
otherwise.boolean isRunning()
true
if the process is running, false
otherwise.