CommandResults is immutable, this class is used to build up the results during CommandStep#run(CommandResultsBuilder).
| Modifier and Type | Field and Description |
|---|---|
| private final CommandScope | |
| private final OutputStream | |
| private final SortedMap |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public CommandResultsBuilder | |
| public <T> CommandResultsBuilder | addResult(CommandResultDefinition<T> definition, T value)
Sets the value for a known |
| pack-priv CommandResults | |
| public CommandFailedException | |
| public CommandFailedException | |
| public CommandScope | |
| public OutputStream | |
| public Object |
| commandScope | back to summary |
|---|---|
| private final CommandScope commandScope | |
| outputStream | back to summary |
|---|---|
| private final OutputStream outputStream | |
| resultValues | back to summary |
|---|---|
| private final SortedMap<String, Object> resultValues | |
| CommandResultsBuilder | back to summary |
|---|---|
| pack-priv CommandResultsBuilder(CommandScope commandScope, OutputStream outputStream) | |
| addResult | back to summary |
|---|---|
| public CommandResultsBuilder addResult(String key, Object value) Adds a key/value pair to the command results. | |
| addResult | back to summary |
|---|---|
| public <T> CommandResultsBuilder addResult(CommandResultDefinition<T> definition, T value) Sets the value for a known | |
| build | back to summary |
|---|---|
| pack-priv CommandResults build() Collects the results and flushes the output stream. | |
| commandFailed | back to summary |
|---|---|
| public CommandFailedException commandFailed(String message, int exitCode) | |
| commandFailed | back to summary |
|---|---|
| public CommandFailedException commandFailed(String message, int exitCode, boolean expected) | |
| getCommandScope | back to summary |
|---|---|
| public CommandScope getCommandScope() Return the | |
| getOutputStream | back to summary |
|---|---|
| public OutputStream getOutputStream() Returns the
| |
| getResult | back to summary |
|---|---|
| public Object getResult(String key) Allows any step of the pipeline to access any of the results. | |