Package com.example.helloworld.cli
Class RenderCommand
java.lang.Object
io.dropwizard.core.cli.Command
io.dropwizard.core.cli.ConfiguredCommand<HelloWorldConfiguration>
com.example.helloworld.cli.RenderCommand
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(net.sourceforge.argparse4j.inf.Subparser subparser) Configure the command'sSubparser
.protected void
run
(Bootstrap<HelloWorldConfiguration> bootstrap, net.sourceforge.argparse4j.inf.Namespace namespace, HelloWorldConfiguration configuration) Runs the command with the givenBootstrap
andConfiguration
.Methods inherited from class io.dropwizard.core.cli.ConfiguredCommand
addFileArgument, cleanup, cleanupAsynchronously, getConfiguration, getConfigurationClass, run
Methods inherited from class io.dropwizard.core.cli.Command
getDescription, getName, onError
-
Constructor Details
-
RenderCommand
public RenderCommand()
-
-
Method Details
-
configure
public void configure(net.sourceforge.argparse4j.inf.Subparser subparser) Description copied from class:ConfiguredCommand
Configure the command'sSubparser
.N.B.: if you override this method, you must call
super.override(subparser)
in order to preserve the configuration file parameter in the subparser.- Overrides:
configure
in classConfiguredCommand<HelloWorldConfiguration>
- Parameters:
subparser
- theSubparser
specific to the command
-
run
protected void run(Bootstrap<HelloWorldConfiguration> bootstrap, net.sourceforge.argparse4j.inf.Namespace namespace, HelloWorldConfiguration configuration) throws Exception Description copied from class:ConfiguredCommand
Runs the command with the givenBootstrap
andConfiguration
.- Specified by:
run
in classConfiguredCommand<HelloWorldConfiguration>
- Parameters:
bootstrap
- the bootstrap bootstrapnamespace
- the parsed command line namespaceconfiguration
- the configuration object- Throws:
Exception
- if something goes wrong
-