Interface ExecuteStreamHandler

All Known Implementing Classes:
PumpStreamHandler

public interface ExecuteStreamHandler
Handles stream of subprocesses for Executors.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Sets a handler for the error stream of the subprocess.
    void
    Sets a handler for the input stream of the subprocess.
    void
    Sets a handler for the output stream of the subprocess.
    void
    Starts handling of the streams.
    void
    Stops handling of the streams - will not be restarted.
  • Method Details

    • setProcessErrorStream

      void setProcessErrorStream(InputStream inputStream) throws 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:
      IOException - thrown when an I/O exception occurs.
    • setProcessInputStream

      void setProcessInputStream(OutputStream outputStream) throws 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:
      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

      void start() throws IOException
      Starts handling of the streams.
      Throws:
      IOException - thrown when an I/O exception occurs.
    • stop

      void stop() throws IOException
      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.