public static class WorkerProcessProtocolZero.CommandSender extends Object implements WorkerProcessProtocol.CommandSender
Constructor and Description |
---|
CommandSender(OutputStream processStdin,
InputStream processStdout,
Path stdErr,
Runnable onClose,
java.util.function.Supplier<Boolean> isAlive) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Instructs the CommandReceiver to shut itself down.
|
void |
handshake(int messageId) |
WorkerProcessProtocol.CommandResponse |
receiveNextCommandResponse() |
void |
send(int messageId,
com.facebook.buck.worker.WorkerProcessCommand command) |
public CommandSender(OutputStream processStdin, InputStream processStdout, Path stdErr, Runnable onClose, java.util.function.Supplier<Boolean> isAlive)
public void handshake(int messageId) throws IOException
handshake
in interface WorkerProcessProtocol.CommandSender
IOException
public void send(int messageId, com.facebook.buck.worker.WorkerProcessCommand command) throws IOException
send
in interface WorkerProcessProtocol.CommandSender
IOException
public WorkerProcessProtocol.CommandResponse receiveNextCommandResponse() throws IOException
receiveNextCommandResponse
in interface WorkerProcessProtocol.CommandSender
IOException
public void close() throws IOException
WorkerProcessProtocol.CommandSender
close
in interface WorkerProcessProtocol.CommandSender
close
in interface Closeable
close
in interface AutoCloseable
IOException