@SPI public interface Filter
They way filter work from sequence point of view is
...code before filter ...
invoker.invoke(invocation) //filter work in a filter implementation class
...code after filter ...
Caching is implemented in dubbo using filter approach. If cache is configured for invocation then before
remote call configured caching type's (e.g. Thread Local, JCache etc) implementation invoke method gets called.
Filter. (SPI, Singleton, ThreadSafe)GenericFilter,
EchoFilter,
TokenFilter,
TpsLimitFilter| 限定符和类型 | 接口和说明 |
|---|---|
static interface |
Filter.Listener |
| 限定符和类型 | 方法和说明 |
|---|---|
Result |
invoke(Invoker<?> invoker,
Invocation invocation)
Does not need to override/implement this method.
|
default Result |
onResponse(Result appResponse,
Invoker<?> invoker,
Invocation invocation)
已过时。
|
Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException
RpcException@Deprecated default Result onResponse(Result appResponse, Invoker<?> invoker, Invocation invocation)
Filter.ListenerappResponse - invoker - invocation - Copyright © 2011–2019 The Apache Software Foundation. All rights reserved.