public class DefaultProcessExecutor extends java.lang.Object implements ProcessExecutor
Constructor and Description |
---|
DefaultProcessExecutor(com.android.utils.ILogger logger) |
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)
Asynchronously submits a process for execution.
|
public DefaultProcessExecutor(com.android.utils.ILogger logger)
@NonNull public com.google.common.util.concurrent.ListenableFuture<ProcessResult> submit(@NonNull ProcessInfo processInfo, @NonNull ProcessOutputHandler processOutputHandler)
submit
in interface ProcessExecutor
processInfo
- process execution informationprocessOutputHandler
- handler for process output@NonNull public ProcessResult execute(@NonNull ProcessInfo processInfo, @NonNull ProcessOutputHandler processOutputHandler)
ProcessExecutor
The process always returns, even when the execution failed. The various possible outcomes of the execution can be queried through the ProcessResult instance.
execute
in interface ProcessExecutor
processInfo
- the specification of what to runprocessOutputHandler
- the output handler