| 程序包 | 说明 |
|---|---|
| org.apache.dubbo.rpc | |
| org.apache.dubbo.rpc.filter | |
| org.apache.dubbo.rpc.listener | |
| org.apache.dubbo.rpc.protocol | |
| org.apache.dubbo.rpc.proxy | |
| org.apache.dubbo.rpc.support |
| 限定符和类型 | 类和说明 |
|---|---|
class |
AppResponse
AsyncRpcResult is introduced in 3.0.0 to replace RpcResult, and RpcResult is replaced with AppResponse:
AsyncRpcResult is the object that is actually passed in the call chain
AppResponse only simply represents the business result
The relationship between them can be described as follow, an abstraction of the definition of AsyncRpcResult:
Public class AsyncRpcResult implements CompletionStage |
class |
AsyncRpcResult
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.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Result |
Result.get() |
Result |
AppResponse.get() |
Result |
AsyncRpcResult.get()
This method will always return after a maximum 'timeout' waiting:
1. if value returns before timeout, return normally.
2. if no value returns after timeout, throw TimeoutException.
|
Result |
Result.get(long timeout,
TimeUnit unit) |
Result |
AppResponse.get(long timeout,
TimeUnit unit) |
Result |
AsyncRpcResult.get(long timeout,
TimeUnit unit) |
Result |
AsyncRpcResult.getAppResponse() |
Result |
Invoker.invoke(Invocation invocation)
invoke.
|
Result |
BaseFilter.invoke(Invoker<?> invoker,
Invocation invocation)
Always call invoker.invoke() in the implementation to hand over the request to the next filter node.
|
Result |
Result.whenCompleteWithContext(BiConsumer<Result,Throwable> fn)
Add a callback which can be triggered when the RPC call finishes.
|
Result |
AppResponse.whenCompleteWithContext(BiConsumer<Result,Throwable> fn) |
Result |
AsyncRpcResult.whenCompleteWithContext(BiConsumer<Result,Throwable> fn) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
BaseFilter.Listener.onResponse(Result appResponse,
Invoker<?> invoker,
Invocation invocation)
This method will only be called on successful remote rpc execution, that means, the service in on remote received
the request and the result (normal or exceptional) returned successfully.
|
| 限定符和类型 | 方法和说明 |
|---|---|
<U> CompletableFuture<U> |
Result.thenApply(Function<Result,? extends U> fn) |
<U> CompletableFuture<U> |
AppResponse.thenApply(Function<Result,? extends U> fn) |
<U> CompletableFuture<U> |
AsyncRpcResult.thenApply(Function<Result,? extends U> fn) |
Result |
Result.whenCompleteWithContext(BiConsumer<Result,Throwable> fn)
Add a callback which can be triggered when the RPC call finishes.
|
Result |
AppResponse.whenCompleteWithContext(BiConsumer<Result,Throwable> fn) |
Result |
AsyncRpcResult.whenCompleteWithContext(BiConsumer<Result,Throwable> fn) |
| 限定符和类型 | 方法和说明 |
|---|---|
Result |
AccessLogFilter.invoke(Invoker<?> invoker,
Invocation inv)
This method logs the access log for service method invocation call.
|
Result |
CompatibleFilter.invoke(Invoker<?> invoker,
Invocation invocation) |
Result |
ClassLoaderFilter.invoke(Invoker<?> invoker,
Invocation invocation) |
Result |
ProfilerServerFilter.invoke(Invoker<?> invoker,
Invocation invocation) |
Result |
ExecuteLimitFilter.invoke(Invoker<?> invoker,
Invocation invocation) |
Result |
TpsLimitFilter.invoke(Invoker<?> invoker,
Invocation invocation) |
Result |
ActiveLimitFilter.invoke(Invoker<?> invoker,
Invocation invocation) |
Result |
AdaptiveLoadBalanceFilter.invoke(Invoker<?> invoker,
Invocation invocation) |
Result |
ExceptionFilter.invoke(Invoker<?> invoker,
Invocation invocation) |
Result |
GenericImplFilter.invoke(Invoker<?> invoker,
Invocation invocation) |
Result |
EchoFilter.invoke(Invoker<?> invoker,
Invocation inv) |
Result |
ClassLoaderCallbackFilter.invoke(Invoker<?> invoker,
Invocation invocation) |
Result |
TokenFilter.invoke(Invoker<?> invoker,
Invocation inv) |
Result |
ContextFilter.invoke(Invoker<?> invoker,
Invocation invocation) |
Result |
DeprecatedFilter.invoke(Invoker<?> invoker,
Invocation invocation) |
Result |
TimeoutFilter.invoke(Invoker<?> invoker,
Invocation invocation) |
Result |
GenericFilter.invoke(Invoker<?> invoker,
Invocation inv) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
CompatibleFilter.onResponse(Result appResponse,
Invoker<?> invoker,
Invocation invocation) |
void |
ClassLoaderFilter.onResponse(Result appResponse,
Invoker<?> invoker,
Invocation invocation) |
void |
ProfilerServerFilter.onResponse(Result appResponse,
Invoker<?> invoker,
Invocation invocation) |
void |
ExecuteLimitFilter.onResponse(Result appResponse,
Invoker<?> invoker,
Invocation invocation) |
void |
ActiveLimitFilter.onResponse(Result appResponse,
Invoker<?> invoker,
Invocation invocation) |
void |
AdaptiveLoadBalanceFilter.onResponse(Result appResponse,
Invoker<?> invoker,
Invocation invocation) |
void |
ExceptionFilter.onResponse(Result appResponse,
Invoker<?> invoker,
Invocation invocation) |
void |
GenericImplFilter.onResponse(Result appResponse,
Invoker<?> invoker,
Invocation invocation) |
void |
ClassLoaderCallbackFilter.onResponse(Result appResponse,
Invoker<?> invoker,
Invocation invocation) |
void |
ContextFilter.onResponse(Result appResponse,
Invoker<?> invoker,
Invocation invocation) |
void |
TimeoutFilter.onResponse(Result appResponse,
Invoker<?> invoker,
Invocation invocation) |
void |
GenericFilter.onResponse(Result appResponse,
Invoker<?> invoker,
Invocation inv) |
| 限定符和类型 | 方法和说明 |
|---|---|
Result |
ListenerInvokerWrapper.invoke(Invocation invocation) |
| 限定符和类型 | 方法和说明 |
|---|---|
Result |
AbstractInvoker.invoke(Invocation inv) |
Result |
InvokerWrapper.invoke(Invocation invocation) |
Result |
ReferenceCountInvokerWrapper.invoke(Invocation invocation) |
| 限定符和类型 | 方法和说明 |
|---|---|
Result |
AbstractProxyInvoker.invoke(Invocation invocation) |
| 限定符和类型 | 方法和说明 |
|---|---|
Result |
MockInvoker.invoke(Invocation invocation) |
Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.