Interface HelperResourceBuilder


public interface HelperResourceBuilder
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    register(String resourcePath)
    Registers a resource to be injected in the user's class loader.
    void
    register(String applicationResourcePath, String agentResourcePath)
    Registers a resource to be injected in the user's class loader.
    default void
    Registers a resource to be injected into all class loaders in the instrumented application.
    void
    registerForAllClassLoaders(String applicationResourcePath, String agentResourcePath)
    Registers a resource to be injected into all class loaders in the instrumented application.
  • Method Details

    • register

      default void register(String resourcePath)
      Registers a resource to be injected in the user's class loader.

      This is a convenience method for register(resourcePath, resourcePath).

    • register

      void register(String applicationResourcePath, String agentResourcePath)
      Registers a resource to be injected in the user's class loader.

      agentResourcePath can be the same as applicationResourcePath, but it is often desirable to use a slightly different path for agentResourcePath, so that multiple versions of an instrumentation (each injecting their own version of the resource) can co-exist inside the agent jar file.

      Parameters:
      applicationResourcePath - the path in the user's class loader at which to inject the resource
      agentResourcePath - the path in the agent class loader from which to get the content for the resource
    • registerForAllClassLoaders

      default void registerForAllClassLoaders(String resourcePath)
      Registers a resource to be injected into all class loaders in the instrumented application.

      This is a convenience method for registerForAllClassLoaders(resourcePath, resourcePath).

    • registerForAllClassLoaders

      void registerForAllClassLoaders(String applicationResourcePath, String agentResourcePath)
      Registers a resource to be injected into all class loaders in the instrumented application.

      agentResourcePath can be the same as applicationResourcePath, but it is often desirable to use a slightly different path for agentResourcePath, so that multiple versions of an instrumentation (each injecting their own version of the resource) can co-exist inside the agent jar file.

      Parameters:
      applicationResourcePath - the path in the user's class loader at which to inject the resource
      agentResourcePath - the path in the agent class loader from which to get the content for the resource