Interface ExecResult<T extends Resource>

Type Parameters:
T - the resource type
All Superinterfaces:
FaultAware, Resource
All Known Implementing Classes:
DefaultExecResult

public interface ExecResult<T extends Resource> extends Resource, FaultAware
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 Details

    • exitValue

      int exitValue()
      The exit value.
      Returns:
      the exit value
    • asOf

      Sets the instant to be returned by Resource.asOf().
      Parameters:
      asOf - the as of
      Returns:
      the exec result
    • resources

      default Stream<T> resources()
      Returns the stream of resources produced by the execution. Each invocation of this method must return a new stream.
      Returns:
      the stream
    • of

      static ExecResult<?> of(ResourceProvider provider, String name, int exitValue)
      Creates a new execution result from the given values.
      Parameters:
      provider - the provider
      name - the name
      exitValue - 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 provider
      name - the name
      exitValue - the exit value
      resources - the resources
      Returns:
      the exec result