Class DeepAPILoader


  • public class DeepAPILoader
    extends Object
    This is a utility class that allows loading the Deep API.

    We have this type separate from the deep module, so we can have custom loading in special uses of deep.

    • Method Detail

      • awaitAPI

        public static void awaitAPI()
        When we start Deep via the config, (ie not as a javaagent) we need to await the start. This should not take very long.

        Essentially when we tell Bytebuddy to load the agent, this is sometimes done as an async external process. Which we cannot await. We need to, however, get an instance of the deep api hooked back after deep has connected. So we just keep trying.

        This should not ever fail, as the agent will either load, or we will get an exception from the load. Once it is loaded however it can take some time to initialise depending on the size of the environment.

      • api

        public static <T> T api()
        Get an instance of the API to allow calling NerdVision directly

        This uses T as the type IDeep is not loaded so this class cannot use it.

        Type Parameters:
        T - this should be IDeep
        Returns:
        the new instance or IDeep
        Throws:
        IllegalStateException - if NerdVision has not been started yet.
      • reflection

        public static <T> T reflection()
        Get an instance of the Reflection api used in deep.

        This uses T as the type IReflection is not loaded so this class cannot use it.

        Type Parameters:
        T - this should be IReflection
        Returns:
        the IReflection service