Class AbstractAgent

  • Direct Known Subclasses:
    PushAgent

    public abstract class AbstractAgent
    extends Object
    Agent that runs remotely on a server collecting metrics.
    Author:
    Clement Pang ([email protected])
    • Field Detail

      • logger

        protected static final Logger logger
      • PARAMETERS_TO_HIDE

        protected static final Set<String> PARAMETERS_TO_HIDE
        A set of commandline parameters to hide when echoing command line arguments
      • shutdownTasks

        protected final List<Runnable> shutdownTasks
      • validationConfiguration

        protected final com.wavefront.api.agent.ValidationConfiguration validationConfiguration
      • agentId

        protected UUID agentId
      • sslContext

        protected io.netty.handler.ssl.SslContext sslContext
      • secureAllPorts

        protected boolean secureAllPorts
    • Constructor Detail

      • AbstractAgent

        @Deprecated
        public AbstractAgent​(boolean localAgent,
                             boolean pushAgent)
        Deprecated.
      • AbstractAgent

        public AbstractAgent()
    • Method Detail

      • start

        public void start​(String[] args)
        Entry-point for the application.
        Parameters:
        args - Command-line parameters passed on to JCommander to configure the daemon.
      • processConfiguration

        protected void processConfiguration​(com.wavefront.api.agent.AgentConfiguration config)
        Actual agents can do additional configuration.
        Parameters:
        config - The configuration to process.
      • shutdown

        public void shutdown()
        Best-effort graceful shutdown.
      • startListeners

        protected abstract void startListeners()
                                        throws Exception
        Starts all listeners as configured.
        Throws:
        Exception
      • stopListeners

        protected abstract void stopListeners()
        Stops all listeners before terminating the process.
      • stopListener

        protected abstract void stopListener​(int port)
        Shut down specific listener pipeline.
        Parameters:
        port - port number.