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| 构造器和说明 |
|---|
CompatibleFilter() |
| 限定符和类型 | 方法和说明 |
|---|---|
Result |
invoke(Invoker<?> invoker,
Invocation invocation)
Make sure call invoker.invoke() in your implementation.
|
void |
onError(Throwable t,
Invoker<?> invoker,
Invocation invocation) |
void |
onResponse(Result appResponse,
Invoker<?> invoker,
Invocation invocation) |
public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException
Filterinvoke 在接口中 FilterRpcExceptionpublic void onResponse(Result appResponse, Invoker<?> invoker, Invocation invocation)
onResponse 在接口中 Filter.Listenerpublic void onError(Throwable t, Invoker<?> invoker, Invocation invocation)
onError 在接口中 Filter.ListenerCopyright © 2011–2021 The Apache Software Foundation. All rights reserved.