Interface Callback

    • Field Detail

      • NOOP

        static final Callback NOOP
        Instance of Adapter that can be used when the callback methods need an empty implementation without incurring in the cost of allocating a new Adapter object.
    • Method Detail

      • succeeded

        default void succeeded()

        Callback invoked when the operation completes.

        See Also:
        failed(Throwable)
      • failed

        default void failed​(Throwable x)

        Callback invoked when the operation fails.

        Parameters:
        x - the reason for the operation failure
      • from

        static Callback from​(CompletableFuture<?> completable,
                             Invocable.InvocationType invocation)

        Creates a callback from the given incomplete CompletableFuture, with the given blocking characteristic.

        Parameters:
        completable - the CompletableFuture to convert into a callback
        invocation - whether the callback is blocking
        Returns:
        a callback that when completed, completes the given CompletableFuture