Interface CompletionStageFuture.Resolver<T>

Enclosing interface:
CompletionStageFuture<T>

public static interface CompletionStageFuture.Resolver<T>
  • Method Details

    • complete

      boolean complete(T value)
      If not already completed, sets the value returned by Future.get() and related methods to the given value.
      Parameters:
      value - the result value
      Returns:
      true if this invocation caused this CompletionStageFuture to transition to a completed state, else false
      See Also:
    • completeExceptionally

      boolean completeExceptionally(@NotNull @NotNull Throwable ex)
      If not already completed, causes invocations of Future.get() and related methods to throw the given exception wrapped in an ExecutionException.
      Parameters:
      ex - the exception
      Returns:
      true if this invocation caused this CompletionStageFuture to transition to a completed state, else false
      See Also:
    • getFuture

      CompletionStageFuture<T> getFuture()
      Returns:
      the underlying future to provide to the recipient; implementations must ensure that this method always returns an identical result for a given Resolver instance