Package io.dropwizard.core.cli
Class CheckCommand<T extends Configuration>
java.lang.Object
io.dropwizard.core.cli.Command
io.dropwizard.core.cli.ConfiguredCommand<T>
io.dropwizard.core.cli.CheckCommand<T>
- Type Parameters:
T
- theConfiguration
subclass which is loaded from the configuration file
Parses and validates the application's configuration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns theClass
of the configuration type.void
Method is called if there is an issue parsing configuration, setting up the environment, or running the command itself.protected void
Runs the command with the givenBootstrap
andConfiguration
.Methods inherited from class io.dropwizard.core.cli.ConfiguredCommand
addFileArgument, cleanup, cleanupAsynchronously, configure, getConfiguration, run
Methods inherited from class io.dropwizard.core.cli.Command
getDescription, getName
-
Constructor Details
-
CheckCommand
-
-
Method Details
-
getConfigurationClass
Description copied from class:ConfiguredCommand
Returns theClass
of the configuration type.- Overrides:
getConfigurationClass
in classConfiguredCommand<T extends Configuration>
- Returns:
- the
Class
of the configuration type
-
run
protected void run(Bootstrap<T> bootstrap, net.sourceforge.argparse4j.inf.Namespace namespace, T configuration) throws Exception Description copied from class:ConfiguredCommand
Runs the command with the givenBootstrap
andConfiguration
.- Specified by:
run
in classConfiguredCommand<T extends Configuration>
- Parameters:
bootstrap
- the bootstrapnamespace
- the parsed command line namespaceconfiguration
- the configuration object- Throws:
Exception
- if something goes wrong
-
onError
Description copied from class:Command
Method is called if there is an issue parsing configuration, setting up the environment, or running the command itself. The default is printing the stacktrace to facilitate debugging, but can be customized per command.
-