Class ConsumerContextFilter
java.lang.Object
org.apache.dubbo.rpc.cluster.filter.support.ConsumerContextFilter
- All Implemented Interfaces:
BaseFilter,BaseFilter.Listener,ClusterFilter
- Direct Known Subclasses:
CallbackConsumerContextFilter
@Activate(group="consumer",
order=-2147483648)
public class ConsumerContextFilter
extends Object
implements ClusterFilter, BaseFilter.Listener
ConsumerContextFilter set current RpcContext with invoker,invocation, local host, remote host and port
for consumer invoker.It does it to make the requires info available to execution thread's RpcContext.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.dubbo.rpc.BaseFilter
BaseFilter.Listener -
Constructor Summary
ConstructorsConstructorDescriptionConsumerContextFilter(org.apache.dubbo.rpc.model.ApplicationModel applicationModel) -
Method Summary
Modifier and TypeMethodDescriptioninvoke(Invoker<?> invoker, Invocation invocation) voidonError(Throwable t, Invoker<?> invoker, Invocation invocation) voidonResponse(Result appResponse, Invoker<?> invoker, Invocation invocation)
-
Constructor Details
-
ConsumerContextFilter
public ConsumerContextFilter(org.apache.dubbo.rpc.model.ApplicationModel applicationModel)
-
-
Method Details
-
invoke
- Specified by:
invokein interfaceBaseFilter- Throws:
RpcException
-
onResponse
- Specified by:
onResponsein interfaceBaseFilter.Listener
-
onError
- Specified by:
onErrorin interfaceBaseFilter.Listener
-