Class JobProcess

java.lang.Object
org.codelibs.fess.util.JobProcess

public class JobProcess extends Object
A wrapper class that manages a system process for job execution. This class provides access to the underlying process and manages the input stream thread for capturing process output.
  • Field Details

    • process

      protected Process process
      The underlying system process.
    • inputStreamThread

      protected InputStreamThread inputStreamThread
      The thread that handles reading from the process input stream.
  • Constructor Details

    • JobProcess

      public JobProcess(Process process)
      Constructs a new JobProcess with the specified process. Uses the default buffer size and no output callback.
      Parameters:
      process - the system process to wrap
    • JobProcess

      public JobProcess(Process process, int bufferSize, Consumer<String> outputCallback)
      Constructs a new JobProcess with the specified process, buffer size, and output callback.
      Parameters:
      process - the system process to wrap
      bufferSize - the buffer size for reading process output
      outputCallback - the callback function to handle process output lines
  • Method Details

    • getProcess

      public Process getProcess()
      Returns the underlying system process.
      Returns:
      the wrapped process
    • getInputStreamThread

      public InputStreamThread getInputStreamThread()
      Returns the input stream thread that handles process output.
      Returns:
      the input stream thread