Interface ListenableCompletionStage<V>

  • All Superinterfaces:
    java.util.concurrent.CompletionStage<V>, java.util.concurrent.Future<V>, com.google.common.util.concurrent.ListenableFuture<V>
    All Known Implementing Classes:
    ListenableCompletableFuture

    public interface ListenableCompletionStage<V>
    extends java.util.concurrent.CompletionStage<V>, com.google.common.util.concurrent.ListenableFuture<V>
    A CompletionStage with a ListenableFuture-compatible interface to smooth migration from Guava ListenableFuture to CompletableFuture/CompletionStage.

    Note that this is much easier to implement than trying to extend AbstractFuture to implement CompletionStage.

    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default void addListener​(java.lang.Runnable listener, java.util.concurrent.Executor executor)  
      • Methods inherited from interface java.util.concurrent.CompletionStage

        acceptEither, acceptEitherAsync, acceptEitherAsync, applyToEither, applyToEitherAsync, applyToEitherAsync, exceptionally, handle, handleAsync, handleAsync, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, whenComplete, whenCompleteAsync, whenCompleteAsync
      • Methods inherited from interface java.util.concurrent.Future

        cancel, get, get, isCancelled, isDone
    • Method Detail

      • addListener

        default void addListener​(java.lang.Runnable listener,
                                 java.util.concurrent.Executor executor)
        Specified by:
        addListener in interface com.google.common.util.concurrent.ListenableFuture<V>