Package org.apache.commons.exec
Interface ExecuteStreamHandler
- All Known Implementing Classes:
PumpStreamHandler
public interface ExecuteStreamHandler
Handles stream of subprocesses for
Executors.-
Method Summary
Modifier and TypeMethodDescriptionvoidsetProcessErrorStream(InputStream inputStream) Sets a handler for the error stream of the subprocess.voidsetProcessInputStream(OutputStream outputStream) Sets a handler for the input stream of the subprocess.voidsetProcessOutputStream(InputStream inputStream) Sets a handler for the output stream of the subprocess.voidstart()Starts handling of the streams.voidstop()Stops handling of the streams - will not be restarted.
-
Method Details
-
setProcessErrorStream
Sets a handler for the error stream of the subprocess.- Parameters:
inputStream- input stream to read from the error stream from the subprocess.- Throws:
IOException- thrown when an I/O exception occurs.
-
setProcessInputStream
Sets a handler for the input stream of the subprocess.- Parameters:
outputStream- output stream to write to the standard input stream of the subprocess.- Throws:
IOException- thrown when an I/O exception occurs.
-
setProcessOutputStream
Sets a handler for the output stream of the subprocess.- Parameters:
inputStream- input stream to read from the error stream from the subprocess.- Throws:
IOException- thrown when an I/O exception occurs.
-
start
Starts handling of the streams.- Throws:
IOException- thrown when an I/O exception occurs.
-
stop
Stops handling of the streams - will not be restarted. Will wait for pump threads to complete.- Throws:
IOException- thrown when an I/O exception occurs.
-