Interface ExecResult<T extends Resource>
- Type Parameters:
T- the resource type
- All Superinterfaces:
FaultAware, Resource
- All Known Implementing Classes:
DefaultExecResult
Provides the results from executing a process. The type of resource
related to the execution depends on the provider. It is recommended
to this as a base interface for defining execution results with
the resource type bound to a specific type.
-
Method Summary
Modifier and TypeMethodDescriptionSets the instant to be returned byResource.asOf().intThe exit value.static ExecResult<?> of(ResourceProvider provider, String name, int exitValue) Creates a new execution result from the given values.static <T extends Resource>
ExecResult<T> of(ResourceProvider provider, String name, int exitValue, Stream<T> resources) Creates a new execution result from the given values.Returns the stream of resources produced by the execution.Methods inherited from interface FaultAware
isFaulty, setFaultyMethods inherited from interface Resource
asOf, asOfLocalized, cleanup, isNewerThan, name, type
-
Method Details
-
exitValue
-
asOf
Sets the instant to be returned byResource.asOf().- Parameters:
asOf- the as of- Returns:
- the exec result
-
resources
-
of
Creates a new execution result from the given values.- Parameters:
provider- the providername- the nameexitValue- the exit value- Returns:
- the exec result
-
of
static <T extends Resource> ExecResult<T> of(ResourceProvider provider, String name, int exitValue, Stream<T> resources) Creates a new execution result from the given values.- Type Parameters:
T- the generic type- Parameters:
provider- the providername- the nameexitValue- the exit valueresources- the resources- Returns:
- the exec result
-