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, whenCompleteAsync
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
completionFuture, from, getNow, isCompletedExceptionally, join, of, ofFailure
closeFuture
get, get, isCancelled, isDone
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
public DefaultRpcResponse()
public DefaultRpcResponse(@Nullable Object result)
result
- the result or an RPC callpublic DefaultRpcResponse(Throwable cause)
cause
- the cause of failurepublic final Throwable cause()
RpcResponse
RpcResponse
completed exceptionally.cause
in interface RpcResponse
null
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 2015–2017 LINE Corporation. All rights reserved.