Search in sources :

Example 1 with EntryInvocationHandler

use of com.newrelic.agent.tracers.EntryInvocationHandler in project newrelic-java-agent by newrelic.

the class AgentWrapper method invoke.

/**
 * @see ReflectionStyleClassMethodAdapter
 */
public static ExitTracer invoke(PointCutInvocationHandler invocationHandler, String className, String methodName, String methodDesc, Object invocationTarget, Object[] args) {
    ClassMethodSignature classMethodSig = new ClassMethodSignature(className, methodName, methodDesc);
    if (invocationHandler instanceof EntryInvocationHandler) {
        EntryInvocationHandler handler = (EntryInvocationHandler) invocationHandler;
        handler.handleInvocation(classMethodSig, invocationTarget, args);
        return null;
    } else if (invocationHandler instanceof TracerFactory) {
        return ServiceFactory.getTracerService().getTracer((TracerFactory) invocationHandler, classMethodSig, invocationTarget, args);
    }
    return null;
}
Also used : ClassMethodSignature(com.newrelic.agent.tracers.ClassMethodSignature) TracerFactory(com.newrelic.agent.tracers.TracerFactory) EntryInvocationHandler(com.newrelic.agent.tracers.EntryInvocationHandler)

Aggregations

ClassMethodSignature (com.newrelic.agent.tracers.ClassMethodSignature)1 EntryInvocationHandler (com.newrelic.agent.tracers.EntryInvocationHandler)1 TracerFactory (com.newrelic.agent.tracers.TracerFactory)1