Package org.apache.commons.exec
Interface ExecuteStreamHandler
- All Known Implementing Classes:
PumpStreamHandler
public interface ExecuteStreamHandler
Handles stream of subprocesses for
Executor
s.-
Method Summary
Modifier and TypeMethodDescriptionvoid
setProcessErrorStream
(InputStream inputStream) Sets a handler for the error stream of the subprocess.void
setProcessInputStream
(OutputStream outputStream) Sets a handler for the input stream of the subprocess.void
setProcessOutputStream
(InputStream inputStream) Sets a handler for the output stream of the subprocess.void
start()
Starts handling of the streams.void
stop()
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.
-