public abstract class ProcessExecutorParams extends Object
ProcessExecutor
to launch a process.Modifier and Type | Class and Description |
---|---|
static class |
ProcessExecutorParams.Builder |
Constructor and Description |
---|
ProcessExecutorParams() |
Modifier and Type | Method and Description |
---|---|
static ProcessExecutorParams.Builder |
builder() |
abstract com.google.common.collect.ImmutableList<String> |
getCommand()
The command and arguments to launch.
|
abstract Optional<Path> |
getDirectory()
If present, the current working directory for the launched process.
|
abstract Optional<com.google.common.collect.ImmutableMap<String,String>> |
getEnvironment()
If present, the map of environment variables used for the launched process.
|
abstract Optional<ProcessBuilder.Redirect> |
getRedirectError()
If present, redirects stderr for the process to this location.
|
abstract Optional<Boolean> |
getRedirectErrorStream() |
abstract Optional<ProcessBuilder.Redirect> |
getRedirectInput()
If present, redirects stdout for the process to this location.
|
abstract Optional<ProcessBuilder.Redirect> |
getRedirectOutput()
If present, redirects stdin for the process to this location.
|
static ProcessExecutorParams |
ofCommand(String... args) |
ProcessExecutorParams |
withEnvironment(com.google.common.collect.ImmutableMap<String,String> environment) |
ProcessExecutorParams |
withRedirectError(ProcessBuilder.Redirect redirectError) |
public static ProcessExecutorParams ofCommand(String... args)
public abstract com.google.common.collect.ImmutableList<String> getCommand()
public abstract Optional<Path> getDirectory()
public abstract Optional<com.google.common.collect.ImmutableMap<String,String>> getEnvironment()
public abstract Optional<ProcessBuilder.Redirect> getRedirectInput()
public abstract Optional<ProcessBuilder.Redirect> getRedirectOutput()
public abstract Optional<ProcessBuilder.Redirect> getRedirectError()
public ProcessExecutorParams withRedirectError(ProcessBuilder.Redirect redirectError)
public ProcessExecutorParams withEnvironment(com.google.common.collect.ImmutableMap<String,String> environment)
public static ProcessExecutorParams.Builder builder()