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- theConfigurationsubclass which is loaded from the configuration file
Parses and validates the application's configuration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns theClassof the configuration type.voidMethod is called if there is an issue parsing configuration, setting up the environment, or running the command itself.protected voidRuns the command with the givenBootstrapandConfiguration.Methods inherited from class io.dropwizard.core.cli.ConfiguredCommand
addFileArgument, cleanup, cleanupAsynchronously, configure, getConfiguration, runMethods inherited from class io.dropwizard.core.cli.Command
getDescription, getName
-
Constructor Details
-
CheckCommand
-
-
Method Details
-
getConfigurationClass
Description copied from class:ConfiguredCommandReturns theClassof the configuration type.- Overrides:
getConfigurationClassin classConfiguredCommand<T extends Configuration>- Returns:
- the
Classof the configuration type
-
run
protected void run(Bootstrap<T> bootstrap, net.sourceforge.argparse4j.inf.Namespace namespace, T configuration) throws Exception Description copied from class:ConfiguredCommandRuns the command with the givenBootstrapandConfiguration.- Specified by:
runin 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:CommandMethod 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.
-