Class PulsarConsumerListenerInterceptor
java.lang.Object
org.apache.skywalking.apm.plugin.pulsar.common.PulsarConsumerListenerInterceptor
- All Implemented Interfaces:
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor
public class PulsarConsumerListenerInterceptor
extends Object
implements org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor
Interceptor for getting pulsar consumer message listener enhanced instance
Here is the intercept process steps:
1. Return null ifConsumerConfigurationDatahas no message listener 2. Return a new lambda expression wrap original message listener 3. New lambda will create local span that continued message reception span 4. Stop the local span when original message listenerreceivedmethod finished.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionafterMethod(org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, Object ret) voidbeforeMethod(org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult result) voidhandleMethodException(org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, Throwable t)
-
Field Details
-
OPERATE_NAME_PREFIX
- See Also:
-
CONSUMER_OPERATE_NAME
- See Also:
-
-
Constructor Details
-
PulsarConsumerListenerInterceptor
public PulsarConsumerListenerInterceptor()
-
-
Method Details
-
beforeMethod
public void beforeMethod(org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult result) throws Throwable - Specified by:
beforeMethodin interfaceorg.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor- Throws:
Throwable
-
afterMethod
public Object afterMethod(org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, Object ret) throws Throwable - Specified by:
afterMethodin interfaceorg.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor- Throws:
Throwable
-
handleMethodException
public void handleMethodException(org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, Throwable t) - Specified by:
handleMethodExceptionin interfaceorg.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor
-