All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.newrelic.api.agent.MethodTracerFactory Maven / Gradle / Ivy

There is a newer version: 8.16.0
Show newest version
/*
 *
 *  * Copyright 2020 New Relic Corporation. All rights reserved.
 *  * SPDX-License-Identifier: Apache-2.0
 *
 */

package com.newrelic.api.agent;

/**
 * A MethodTracerFactory is called when an instrumented method is invoked. The MethodTracerFactory is registered using
 * an instrumentation extension file.
 * 
 * Implementations of this interface must have a public default constructor.
 * 
 * @deprecated
 */
public interface MethodTracerFactory {
    /**
     * Called when an instrumented method is invoked. This method can optionally return a method tracer to be notified
     * when the method invocation finishes (otherwise return null).
     * 
     * @param methodName The name of the traced method being invoked.
     * @param invocationTarget The object being invoked.
     * @param arguments The method arguments.
     * 
     * @return Can return a method tracer to be notified when a method invocation finishes, else returns
     *         null.
     * @since 2.3.0
     */
    MethodTracer methodInvoked(String methodName, Object invocationTarget, Object[] arguments);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy