public class DefaultRpcResponse extends CompletableFuture<Object> implements RpcResponse
RpcResponse implementation.CompletableFuture.AsynchronousCompletionTask| Constructor and Description |
|---|
DefaultRpcResponse()
Creates a new incomplete response.
|
DefaultRpcResponse(Object result)
Creates a new successfully complete response.
|
DefaultRpcResponse(Throwable cause)
Creates a new exceptionally complete response.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
Throwable |
cause()
Returns the cause of the failure if this
RpcResponse completed exceptionally. |
boolean |
completeExceptionally(Throwable cause) |
void |
obtrudeException(Throwable cause) |
String |
toString() |
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, complete, completedFuture, exceptionally, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, obtrudeValue, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, runAsync, runAsync, supplyAsync, supplyAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, whenComplete, whenCompleteAsync, whenCompleteAsyncclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcompletionFuture, from, getNow, isCompletedExceptionally, join, of, ofFailurecloseFutureget, get, isCancelled, isDoneacceptEither, 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, whenCompleteAsyncpublic DefaultRpcResponse()
public DefaultRpcResponse(@Nullable Object result)
result - the result or an RPC callpublic DefaultRpcResponse(Throwable cause)
cause - the cause of failure@Nullable public final Throwable cause()
RpcResponseRpcResponse completed exceptionally.cause in interface RpcResponsenull if this RpcResponse completed successfully or did not complete yet.public boolean completeExceptionally(Throwable cause)
completeExceptionally in class CompletableFuture<Object>public void obtrudeException(Throwable cause)
obtrudeException in class CompletableFuture<Object>public boolean cancel(boolean mayInterruptIfRunning)
public String toString()
toString in class CompletableFuture<Object>Copyright © 2020 LeanCloud. All rights reserved.