Package com.linecorp.armeria.common
Class CompletableRpcResponse
java.lang.Object
java.util.concurrent.CompletableFuture<T>
com.linecorp.armeria.common.util.EventLoopCheckingFuture<Object>
com.linecorp.armeria.common.CompletableRpcResponse
- All Implemented Interfaces:
Response,RpcResponse,CompletionStage<Object>,Future<Object>
public final class CompletableRpcResponse
extends EventLoopCheckingFuture<Object>
implements RpcResponse
An
RpcResponse implementation which is initially incomplete and can be completed later.-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.CompletableFuture
CompletableFuture.AsynchronousCompletionTaskNested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancancel(boolean mayInterruptIfRunning) cause()Returns the cause of the failure if thisRpcResponsecompleted exceptionally.booleancompleteExceptionally(Throwable cause) voidobtrudeException(Throwable cause) toString()Methods inherited from class com.linecorp.armeria.common.util.EventLoopCheckingFuture
completedFuture, exceptionallyCompletedFuture, get, get, joinMethods inherited from class java.util.concurrent.CompletableFuture
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, complete, completeAsync, completeAsync, completedStage, completeOnTimeout, copy, defaultExecutor, delayedExecutor, delayedExecutor, exceptionally, exceptionallyAsync, exceptionallyAsync, exceptionallyCompose, exceptionallyComposeAsync, exceptionallyComposeAsync, exceptionNow, failedFuture, failedStage, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, minimalCompletionStage, newIncompleteFuture, 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, whenComplete, whenCompleteAsync, whenCompleteAsyncMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.concurrent.CompletionStage
acceptEither, acceptEitherAsync, acceptEitherAsync, applyToEither, applyToEitherAsync, applyToEitherAsync, exceptionally, exceptionallyAsync, exceptionallyAsync, exceptionallyCompose, exceptionallyComposeAsync, exceptionallyComposeAsync, 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, whenCompleteAsyncMethods inherited from interface java.util.concurrent.Future
exceptionNow, get, get, isCancelled, isDone, resultNow, stateMethods inherited from interface com.linecorp.armeria.common.RpcResponse
getNow, isCompletedExceptionally, join, whenComplete
-
Constructor Details
-
CompletableRpcResponse
public CompletableRpcResponse()
-
-
Method Details
-
cause
Description copied from interface:RpcResponseReturns the cause of the failure if thisRpcResponsecompleted exceptionally.- Specified by:
causein interfaceRpcResponse- Returns:
- the cause, or
nullif thisRpcResponsecompleted successfully or did not complete yet.
-
completeExceptionally
- Overrides:
completeExceptionallyin classCompletableFuture<Object>
-
obtrudeException
- Overrides:
obtrudeExceptionin classCompletableFuture<Object>
-
cancel
public boolean cancel(boolean mayInterruptIfRunning) -
toString
- Overrides:
toStringin classCompletableFuture<Object>
-