Class Callback.Completable
- Direct Known Subclasses:
ProxyHandler.ProxyResponseListener
- Enclosing interface:
Callback
A CompletableFuture that is also a Callback.
-
Nested Class Summary
Nested classes/interfaces inherited from class CompletableFuture
CompletableFuture.AsynchronousCompletionTaskNested classes/interfaces inherited from interface Callback
Callback.Completable, Callback.Completing, Callback.NestedNested classes/interfaces inherited from interface Future
Future.StateNested classes/interfaces inherited from interface Invocable
Invocable.Callable, Invocable.InvocationType, Invocable.ReadyTask, Invocable.Task -
Field Summary
Fields inherited from interface Invocable
__nonBlocking -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncompose(Consumer<Callback.Completable> consumer) Returns a newCallback.Completablethat, when thisCallback.Completablesucceeds, is passed to the given consumer and then returned.voidCallback invoked when the operation fails.static Callback.CompletableCreates a completable future given a callback.voidCallback invoked when the operation completes.static Callback.Completablewith(Consumer<Callback.Completable> consumer) Creates a newCompletableto be consumed by the givenconsumer, then returns the newly createdCompletable.Methods inherited from class CompletableFuture
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, cancel, complete, completeAsync, completeAsync, completedFuture, completedStage, completeExceptionally, completeOnTimeout, copy, defaultExecutor, delayedExecutor, delayedExecutor, exceptionally, exceptionallyAsync, exceptionallyAsync, exceptionallyCompose, exceptionallyComposeAsync, exceptionallyComposeAsync, exceptionNow, failedFuture, failedStage, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, minimalCompletionStage, newIncompleteFuture, obtrudeException, obtrudeValue, orTimeout, resultNow, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, runAsync, runAsync, state, supplyAsync, supplyAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, toString, whenComplete, whenCompleteAsync, whenCompleteAsyncMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Callback
completeWith
-
Constructor Details
-
Completable
public Completable() -
Completable
-
-
Method Details
-
with
Creates a new
Completableto be consumed by the givenconsumer, then returns the newly createdCompletable.- Parameters:
consumer- the code that consumes the newly createdCompletable- Returns:
- the newly created
Completable
-
from
Creates a completable future given a callback.- Parameters:
callback- The nested callback.- Returns:
- a new Completable which will succeed this callback when completed.
-
succeeded
-
failed
-
getInvocationType
- Specified by:
getInvocationTypein interfaceInvocable- Returns:
- The InvocationType of this object
-
compose
Returns a new
Callback.Completablethat, when thisCallback.Completablesucceeds, is passed to the given consumer and then returned.If this
Callback.Completablefails, the newCallback.Completableis also failed, and the consumer is not invoked.- Parameters:
consumer- the consumer that receives theCallback.Completable- Returns:
- a new
Callback.Completablepassed to the consumer - See Also:
-