Class AsyncRpcResult

java.lang.Object
org.apache.dubbo.rpc.AsyncRpcResult
All Implemented Interfaces:
Serializable, Result

public class AsyncRpcResult extends Object implements Result
This class represents an unfinished RPC call, it will hold some context information for this call, for example RpcContext and Invocation, so that when the call finishes and the result returns, it can guarantee all the contexts being recovered as the same as when the call was made before any callback is invoked.

TODO if it's reasonable or even right to keep a reference to Invocation?

As Result implements CompletionStage, AsyncRpcResult allows you to easily build a async filter chain whose status will be driven entirely by the state of the underlying RPC call.

AsyncRpcResult does not contain any concrete value (except the underlying value bring by CompletableFuture), consider it as a status transfer node. getValue() and getException() are all inherited from Result interface, implementing them are mainly for compatibility consideration. Because many legacy Filter implementation are most possibly to call getValue directly.

See Also: