Class DeepAgent

  • All Implemented Interfaces:
    IDeep

    public class DeepAgent
    extends Object
    implements IDeep
    This is the agent that is provided via the API, and is what holds all deep together.
    • Constructor Detail

      • DeepAgent

        public DeepAgent​(Settings settings,
                         TracepointInstrumentationService tracepointInstrumentationService)
        Create a new deep agent.
        Parameters:
        settings - the settings
        tracepointInstrumentationService - the tracepoint instrumentation service
    • Method Detail

      • start

        public void start()
        Start deep.
      • getVersion

        public String getVersion()
        Description copied from interface: IDeep
        Get the version of deep being used.
        Specified by:
        getVersion in interface IDeep
        Returns:
        the sematic version of deep as a string e.g. 1.2.3
      • registerPlugin

        public IRegistration<IDeepPlugin> registerPlugin​(IDeepPlugin plugin)
        Description copied from interface: IDeep
        This allows the registration of custom plugins.
        Specified by:
        registerPlugin in interface IDeep
        Parameters:
        plugin - the plugin that can be used to decorate snapshots
        Returns:
        a IRegistration that can be used to unregister the plugin
      • isEnabled

        public boolean isEnabled()
        Description copied from interface: IDeep
        Get the current state of deep.
        Specified by:
        isEnabled in interface IDeep
        Returns:
        true if deep is currently enabled and sending requests, else false
      • setEnabled

        public void setEnabled​(boolean enabled)
        Description copied from interface: IDeep
        This method can be used to disabled or enable Deep.

        Changing the state to false (ie disabled) will cause deep to uninstall all the tracepoints and clear the current config. Meaning that when deep is enabled again it will have to reinstall the configuration. It is therefore advised to not call this function too frequently.

        Specified by:
        setEnabled in interface IDeep
        Parameters:
        enabled - the new state to become
      • shutdown

        public void shutdown()