Class Promise.Completable<S>

java.lang.Object
java.util.concurrent.CompletableFuture<S>
org.eclipse.jetty.util.Promise.Completable<S>
Type Parameters:
S - the type of the result
All Implemented Interfaces:
CompletionStage<S>, Future<S>, Promise<S>
Enclosing interface:
Promise<C>

public static class Promise.Completable<S> extends CompletableFuture<S> implements Promise<S>

A CompletableFuture that is also a Promise.

  • Constructor Details

    • Completable

      public Completable()
  • Method Details

    • succeeded

      public void succeeded(S result)
      Description copied from interface: Promise

      Callback invoked when the operation completes.

      Specified by:
      succeeded in interface Promise<S>
      Parameters:
      result - the context
      See Also:
    • failed

      public void failed(Throwable x)
      Description copied from interface: Promise

      Callback invoked when the operation fails.

      Specified by:
      failed in interface Promise<S>
      Parameters:
      x - the reason for the operation failure