Extension for intercepting the invocation for both service provider and consumer, furthermore, most of
functions in dubbo are implemented base on the same mechanism. Since every time when remote method is
invoked, the filter extensions will be executed too, the corresponding penalty should be considered before
more filters are added.
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)