org.springframework.util.concurrent

Interface ListenableFuture<T>

    • Method Detail

      • addCallback

        void addCallback(ListenableFutureCallback<? super T> callback)
        Register the given ListenableFutureCallback.
        Parameters:
        callback - the callback to register
      • addCallback

        void addCallback(SuccessCallback<? super T> successCallback,
                         FailureCallback failureCallback)
        Java 8 lambda-friendly alternative with success and failure callbacks.
        Parameters:
        successCallback - the success callback
        failureCallback - the failure callback
        Since:
        4.1
      • completable

        default java.util.concurrent.CompletableFuture<T> completable()
        Expose this ListenableFuture as a JDK CompletableFuture.
        Since:
        5.0