Package com.netflix.genie.agent.cli
Class JCommanderAutoConfiguration
java.lang.Object
com.netflix.genie.agent.cli.JCommanderAutoConfiguration
Auto configuration for configuring
JCommander to parse CLI arguments of the Agent.- Since:
- 4.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.netflix.genie.agent.cli.ArgumentParserargumentParser(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.CommandFactorycommandFactory(List<com.netflix.genie.agent.cli.AgentCommandArguments> agentCommandArguments, org.springframework.context.ApplicationContext applicationContext) Provide a command factory bean.com.netflix.genie.agent.cli.GlobalAgentArgumentsProvide aGlobalAgentArgumentsbean.com.beust.jcommander.JCommanderjCommander(com.netflix.genie.agent.cli.GlobalAgentArguments globalAgentArguments, List<com.netflix.genie.agent.cli.AgentCommandArguments> agentCommandArguments) Provide aJCommanderbean.
-
Constructor Details
-
JCommanderAutoConfiguration
public JCommanderAutoConfiguration()
-
-
Method Details
-
globalAgentArguments
@Bean public com.netflix.genie.agent.cli.GlobalAgentArguments globalAgentArguments()Provide aGlobalAgentArgumentsbean.- Returns:
- A
GlobalAgentArgumentsinstance
-
jCommander
@Bean public com.beust.jcommander.JCommander jCommander(com.netflix.genie.agent.cli.GlobalAgentArguments globalAgentArguments, List<com.netflix.genie.agent.cli.AgentCommandArguments> agentCommandArguments) Provide aJCommanderbean.- Parameters:
globalAgentArguments- The global command arguments to useagentCommandArguments- An command argument beans in the environment that should also be used in addition to the global command arguments- Returns:
- A
JCommanderinstance
-
commandFactory
@Bean public com.netflix.genie.agent.cli.CommandFactory commandFactory(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 contextapplicationContext- The Spring application context- Returns:
- A
CommandFactoryinstance
-
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 usecommandFactory- The command factory instance to usemainCommandArguments- The container of main arguments for the command- Returns:
- An
ArgumentParserinstance
-