Package org.apache.commons.exec
Interface ExecuteStreamHandler
-
- All Known Implementing Classes:
PumpStreamHandler
public interface ExecuteStreamHandler
Handles stream of subprocesses forExecutors.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidsetProcessErrorStream(java.io.InputStream inputStream)Sets a handler for the error stream of the subprocess.voidsetProcessInputStream(java.io.OutputStream outputStream)Sets a handler for the input stream of the subprocess.voidsetProcessOutputStream(java.io.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 Detail
-
setProcessErrorStream
void setProcessErrorStream(java.io.InputStream inputStream) throws java.io.IOException
Sets a handler for the error stream of the subprocess.- Parameters:
inputStream- input stream to read from the error stream from the subprocess.- Throws:
java.io.IOException- thrown when an I/O exception occurs.
-
setProcessInputStream
void setProcessInputStream(java.io.OutputStream outputStream) throws java.io.IOException
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:
java.io.IOException- thrown when an I/O exception occurs.
-
setProcessOutputStream
void setProcessOutputStream(java.io.InputStream inputStream) throws java.io.IOException
Sets a handler for the output stream of the subprocess.- Parameters:
inputStream- input stream to read from the error stream from the subprocess.- Throws:
java.io.IOException- thrown when an I/O exception occurs.
-
start
void start() throws java.io.IOException
Starts handling of the streams.- Throws:
java.io.IOException- thrown when an I/O exception occurs.
-
stop
void stop() throws java.io.IOException
Stops handling of the streams - will not be restarted. Will wait for pump threads to complete.- Throws:
java.io.IOException- thrown when an I/O exception occurs.
-
-