public class CompatibleFilter extends Object implements Filter, Filter.Listener
1)If the url contain serialization key of type json or fastjson then transform
the return value to instance of Map
2)If the return value is not a instance of invoked method's return type available at
local jvm then POJO conversion.
3)If return value is other than above return value as it is.
FilterFilter.Listener| Constructor and Description |
|---|
CompatibleFilter() |
| Modifier and Type | Method and Description |
|---|---|
Result |
invoke(Invoker<?> invoker,
Invocation invocation)
Make sure call invoker.invoke() in your implementation.
|
void |
onError(Throwable t,
Invoker<?> invoker,
Invocation invocation) |
void |
onMessage(Result appResponse,
Invoker<?> invoker,
Invocation invocation) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonResponsepublic Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException
Filterinvoke in interface FilterRpcExceptionpublic void onMessage(Result appResponse, Invoker<?> invoker, Invocation invocation)
onMessage in interface Filter.Listenerpublic void onError(Throwable t, Invoker<?> invoker, Invocation invocation)
onError in interface Filter.ListenerCopyright © 2011–2019 The Apache Software Foundation. All rights reserved.