@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| Modifier and Type | Interface and Description |
|---|---|
static interface |
Filter.Listener |
| Modifier and Type | Method and Description |
|---|---|
Result |
invoke(Invoker<?> invoker,
Invocation invocation)
Make sure call invoker.invoke() in your implementation.
|
default Result |
onResponse(Result appResponse,
Invoker<?> invoker,
Invocation invocation)
Deprecated.
|
Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException
RpcException@Deprecated default Result onResponse(Result appResponse, Invoker<?> invoker, Invocation invocation)
Filter.Listener.onMessage(Result, Invoker, Invocation) instead.
This method is kept only for compatibility and may get removed at any version in the future.appResponse - invoker - invocation - Copyright © 2011–2019 The Apache Software Foundation. All rights reserved.