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
-
public class RenderCommand extends ConfiguredCommand<HelloWorldConfiguration>
-
-
Constructor Summary
Constructors Constructor Description RenderCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(net.sourceforge.argparse4j.inf.Subparser subparser)Configure the command'sSubparser.protected voidrun(Bootstrap<HelloWorldConfiguration> bootstrap, net.sourceforge.argparse4j.inf.Namespace namespace, HelloWorldConfiguration configuration)Runs the command with the givenBootstrapandConfiguration.-
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
-
-
-
-
Method Detail
-
configure
public void configure(net.sourceforge.argparse4j.inf.Subparser subparser)
Description copied from class:ConfiguredCommandConfigure 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:
configurein classConfiguredCommand<HelloWorldConfiguration>- Parameters:
subparser- theSubparserspecific to the command
-
run
protected void run(Bootstrap<HelloWorldConfiguration> bootstrap, net.sourceforge.argparse4j.inf.Namespace namespace, HelloWorldConfiguration configuration) throws Exception
Description copied from class:ConfiguredCommandRuns the command with the givenBootstrapandConfiguration.- Specified by:
runin classConfiguredCommand<HelloWorldConfiguration>- Parameters:
bootstrap- the bootstrap bootstrapnamespace- the parsed command line namespaceconfiguration- the configuration object- Throws:
Exception- if something goes wrong
-
-