Class JCommanderAutoConfiguration


  • @Configuration
    public class JCommanderAutoConfiguration
    extends java.lang.Object
    Auto configuration for configuring JCommander to parse CLI arguments of the Agent.
    Since:
    4.0.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.netflix.genie.agent.cli.ArgumentParser argumentParser​(com.beust.jcommander.JCommander jCommander, com.netflix.genie.agent.cli.CommandFactory commandFactory, com.netflix.genie.agent.cli.MainCommandArguments mainCommandArguments)
      Provide an argument parser bean.
      com.netflix.genie.agent.cli.CommandFactory commandFactory​(java.util.List<com.netflix.genie.agent.cli.AgentCommandArguments> agentCommandArguments, org.springframework.context.ApplicationContext applicationContext)
      Provide a command factory bean.
      com.netflix.genie.agent.cli.GlobalAgentArguments globalAgentArguments()
      Provide a GlobalAgentArguments bean.
      com.beust.jcommander.JCommander jCommander​(com.netflix.genie.agent.cli.GlobalAgentArguments globalAgentArguments, java.util.List<com.netflix.genie.agent.cli.AgentCommandArguments> agentCommandArguments)
      Provide a JCommander bean.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JCommanderAutoConfiguration

        public JCommanderAutoConfiguration()
    • Method Detail

      • globalAgentArguments

        @Bean
        public com.netflix.genie.agent.cli.GlobalAgentArguments globalAgentArguments()
        Provide a GlobalAgentArguments bean.
        Returns:
        A GlobalAgentArguments instance
      • jCommander

        @Bean
        public com.beust.jcommander.JCommander jCommander​(com.netflix.genie.agent.cli.GlobalAgentArguments globalAgentArguments,
                                                          java.util.List<com.netflix.genie.agent.cli.AgentCommandArguments> agentCommandArguments)
        Provide a JCommander bean.
        Parameters:
        globalAgentArguments - The global command arguments to use
        agentCommandArguments - An command argument beans in the environment that should also be used in addition to the global command arguments
        Returns:
        A JCommander instance
      • commandFactory

        @Bean
        public com.netflix.genie.agent.cli.CommandFactory commandFactory​(java.util.List<com.netflix.genie.agent.cli.AgentCommandArguments> agentCommandArguments,
                                                                         org.springframework.context.ApplicationContext applicationContext)
        Provide a command factory bean.
        Parameters:
        agentCommandArguments - Any agent command argument implementations that are in the application context
        applicationContext - The Spring application context
        Returns:
        A CommandFactory instance
      • argumentParser

        @Bean
        public com.netflix.genie.agent.cli.ArgumentParser argumentParser​(com.beust.jcommander.JCommander jCommander,
                                                                         com.netflix.genie.agent.cli.CommandFactory commandFactory,
                                                                         com.netflix.genie.agent.cli.MainCommandArguments mainCommandArguments)
        Provide an argument parser bean.
        Parameters:
        jCommander - The JCommander instance to use
        commandFactory - The command factory instance to use
        mainCommandArguments - The container of main arguments for the command
        Returns:
        An ArgumentParser instance