public class Command extends Object
| Constructor and Description |
|---|
Command(List<String> command,
Set<Integer> successfulExitCodes,
File directory,
Map<String,String> environment,
Duration timeLimit) |
Command(String... command) |
| Modifier and Type | Method and Description |
|---|---|
Command |
addArgs(Iterable<String> args) |
Command |
addArgs(String... args) |
Command |
addEnvironment(Map<String,String> environment) |
Command |
addEnvironment(String name,
String value) |
boolean |
equals(Object o) |
int |
execute(Executor executor) |
List<String> |
getCommand() |
File |
getDirectory() |
Map<String,String> |
getEnvironment() |
Set<Integer> |
getSuccessfulExitCodes() |
Duration |
getTimeLimit() |
int |
hashCode() |
void |
logOutput(String out)
Logs output of the command to some console or file
|
Command |
setDirectory(File directory) |
Command |
setDirectory(String directory) |
Command |
setSuccessfulExitCodes(int... successfulExitCodes) |
Command |
setSuccessfulExitCodes(Set<Integer> successfulExitCodes) |
Command |
setTimeLimit(double value,
TimeUnit timeUnit) |
Command |
setTimeLimit(Duration timeLimit) |
String |
toString() |
public Command(String... command)
public Command setSuccessfulExitCodes(int... successfulExitCodes)
public File getDirectory()
public Duration getTimeLimit()
public int execute(Executor executor) throws CommandFailedException
CommandFailedExceptionpublic void logOutput(String out)
Copyright © 2014 Red Hat. All Rights Reserved.