Package org.apache.dubbo.rpc.filter
Class GenericFilter
java.lang.Object
org.apache.dubbo.rpc.filter.GenericFilter
- All Implemented Interfaces:
BaseFilter,BaseFilter.Listener,Filter,ScopeModelAware
@Activate(group="provider",
order=-20000)
public class GenericFilter
extends Object
implements Filter, BaseFilter.Listener, ScopeModelAware
GenericInvokerFilter.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.dubbo.rpc.BaseFilter
BaseFilter.Listener -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindMethodByMethodSignature(Class<?> clazz, String methodName, String[] parameterTypes, ServiceModel serviceModel) invoke(Invoker<?> invoker, Invocation inv) Always call invoker.invoke() in the implementation to hand over the request to the next filter node.voidonError(Throwable t, Invoker<?> invoker, Invocation invocation) This method will be called on detection of framework exceptions, for example, TimeoutException, NetworkException Exception raised in Filters, etc.voidonResponse(Result appResponse, Invoker<?> invoker, Invocation inv) This method will only be called on successful remote rpc execution, that means, the service in on remote received the request and the result (normal or exceptional) returned successfully.voidsetApplicationModel(ApplicationModel applicationModel) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.dubbo.rpc.model.ScopeModelAware
setFrameworkModel, setModuleModel, setScopeModel
-
Constructor Details
-
GenericFilter
public GenericFilter()
-
-
Method Details
-
setApplicationModel
- Specified by:
setApplicationModelin interfaceScopeModelAware
-
invoke
Description copied from interface:BaseFilterAlways call invoker.invoke() in the implementation to hand over the request to the next filter node.- Specified by:
invokein interfaceBaseFilter- Throws:
RpcException
-
findMethodByMethodSignature
public Method findMethodByMethodSignature(Class<?> clazz, String methodName, String[] parameterTypes, ServiceModel serviceModel) throws NoSuchMethodException, ClassNotFoundException -
onResponse
Description copied from interface:BaseFilter.ListenerThis method will only be called on successful remote rpc execution, that means, the service in on remote received the request and the result (normal or exceptional) returned successfully.- Specified by:
onResponsein interfaceBaseFilter.Listener- Parameters:
appResponse- , the rpc call result, it can represent both normal result and exceptional resultinvoker- , contextinv- , context
-
onError
Description copied from interface:BaseFilter.ListenerThis method will be called on detection of framework exceptions, for example, TimeoutException, NetworkException Exception raised in Filters, etc.- Specified by:
onErrorin interfaceBaseFilter.Listener- Parameters:
t- , framework exceptioninvoker- , contextinvocation- , context
-