Package org.codelibs.fess.util
Class JobProcess
java.lang.Object
org.codelibs.fess.util.JobProcess
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 Summary
FieldsModifier and TypeFieldDescriptionprotected InputStreamThreadThe thread that handles reading from the process input stream.protected ProcessThe underlying system process. -
Constructor Summary
ConstructorsConstructorDescriptionJobProcess(Process process) Constructs a new JobProcess with the specified process.JobProcess(Process process, int bufferSize, Consumer<String> outputCallback) Constructs a new JobProcess with the specified process, buffer size, and output callback. -
Method Summary
Modifier and TypeMethodDescriptionReturns the input stream thread that handles process output.Returns the underlying system process.
-
Field Details
-
process
The underlying system process. -
inputStreamThread
The thread that handles reading from the process input stream.
-
-
Constructor Details
-
JobProcess
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
Constructs a new JobProcess with the specified process, buffer size, and output callback.- Parameters:
process- the system process to wrapbufferSize- the buffer size for reading process outputoutputCallback- the callback function to handle process output lines
-
-
Method Details
-
getProcess
Returns the underlying system process.- Returns:
- the wrapped process
-
getInputStreamThread
Returns the input stream thread that handles process output.- Returns:
- the input stream thread
-