Package com.facebook.buck.util
Class ProcessExecutorParams
- java.lang.Object
-
- com.facebook.buck.util.ProcessExecutorParams
-
public abstract class ProcessExecutorParams extends Object
Value type passed toProcessExecutor
to launch a process.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ProcessExecutorParams.Builder
-
Constructor Summary
Constructors Constructor Description ProcessExecutorParams()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Method Detail
-
ofCommand
public static ProcessExecutorParams ofCommand(String... args)
-
getCommand
public abstract com.google.common.collect.ImmutableList<String> getCommand()
The command and arguments to launch.
-
getDirectory
public abstract Optional<Path> getDirectory()
If present, the current working directory for the launched process.
-
getEnvironment
public abstract Optional<com.google.common.collect.ImmutableMap<String,String>> getEnvironment()
If present, the map of environment variables used for the launched process. Otherwise, inherits the current process's environment.
-
getRedirectInput
public abstract Optional<ProcessBuilder.Redirect> getRedirectInput()
If present, redirects stdout for the process to this location. Otherwise, opens a pipe for stdout.
-
getRedirectOutput
public abstract Optional<ProcessBuilder.Redirect> getRedirectOutput()
If present, redirects stdin for the process to this location. Otherwise, opens a pipe for stdin.
-
getRedirectError
public abstract Optional<ProcessBuilder.Redirect> getRedirectError()
If present, redirects stderr for the process to this location. Otherwise, opens a pipe for stderr.
-
withRedirectError
public ProcessExecutorParams withRedirectError(ProcessBuilder.Redirect redirectError)
-
withEnvironment
public ProcessExecutorParams withEnvironment(com.google.common.collect.ImmutableMap<String,String> environment)
-
builder
public static ProcessExecutorParams.Builder builder()
-
-