Class Callback.Completable

java.lang.Object
java.util.concurrent.CompletableFuture<Void>
org.eclipse.jetty.util.Callback.Completable
All Implemented Interfaces:
CompletionStage<Void>, Future<Void>, Callback, Invocable
Enclosing interface:
Callback

public static class Callback.Completable extends CompletableFuture<Void> implements Callback

A CompletableFuture that is also a Callback.

  • Constructor Details

  • Method Details

    • from

      public static Callback.Completable from(Callback callback)
      Creates a completable future given a callback.
      Parameters:
      callback - The nested callback.
      Returns:
      a new Completable which will succeed this callback when completed.
    • succeeded

      public void succeeded()
      Description copied from interface: Callback

      Callback invoked when the operation completes.

      Specified by:
      succeeded in interface Callback
      See Also:
    • failed

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

      Callback invoked when the operation fails.

      Specified by:
      failed in interface Callback
      Parameters:
      x - the reason for the operation failure
    • getInvocationType

      public Invocable.InvocationType getInvocationType()
      Specified by:
      getInvocationType in interface Invocable
      Returns:
      The InvocationType of this object