@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)
Does not need to override/implement this method.
|
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.ListenerappResponse - invoker - invocation - Copyright © 2011–2019 The Apache Software Foundation. All rights reserved.