public interface ProcessExecutor
Modifier and Type | Method and Description |
---|---|
ProcessResult |
execute(ProcessInfo processInfo,
ProcessOutputHandler processOutputHandler)
Executes an external process as specified by the ProcessInfo and waits for its completion.
|
com.google.common.util.concurrent.ListenableFuture<ProcessResult> |
submit(ProcessInfo processInfo,
ProcessOutputHandler processOutputHandler)
Executes an external process asynchronously as specified by the ProcessInfo.
|
@NonNull ProcessResult execute(@NonNull ProcessInfo processInfo, @NonNull ProcessOutputHandler processOutputHandler)
The process always returns, even when the execution failed. The various possible outcomes of the execution can be queried through the ProcessResult instance.
processInfo
- the specification of what to runprocessOutputHandler
- the output handler@NonNull com.google.common.util.concurrent.ListenableFuture<ProcessResult> submit(@NonNull ProcessInfo processInfo, @NonNull ProcessOutputHandler processOutputHandler)
The process always returns, even when the execution failed. The various possible outcomes of the execution can be queried through the ProcessResult instance.
processInfo
- the specification of what to runprocessOutputHandler
- the output handler