T
- the Configuration
subclass which is loaded from the configuration fileServerCommand
public abstract class EnvironmentCommand<T extends Configuration> extends ConfiguredCommand<T>
Environment
.Configuration
Modifier | Constructor | Description |
---|---|---|
protected |
EnvironmentCommand(Application<T> application,
java.lang.String name,
java.lang.String description) |
Creates a new environment command.
|
Modifier and Type | Method | Description |
---|---|---|
protected void |
run(Bootstrap<T> bootstrap,
net.sourceforge.argparse4j.inf.Namespace namespace,
T configuration) |
Runs the command with the given
Bootstrap and Configuration . |
protected abstract void |
run(Environment environment,
net.sourceforge.argparse4j.inf.Namespace namespace,
T configuration) |
Runs the command with the given
Environment and Configuration . |
getDescription, getName, onError
addFileArgument, cleanup, cleanupAsynchronously, configure, getConfigurationClass, run
protected EnvironmentCommand(Application<T> application, java.lang.String name, java.lang.String description)
application
- the application providing this commandname
- the name of the command, used for command line invocationdescription
- a description of the command's purposeprotected void run(Bootstrap<T> bootstrap, net.sourceforge.argparse4j.inf.Namespace namespace, T configuration) throws java.lang.Exception
ConfiguredCommand
Bootstrap
and Configuration
.run
in class ConfiguredCommand<T extends Configuration>
bootstrap
- the bootstrap bootstrapnamespace
- the parsed command line namespaceconfiguration
- the configuration objectjava.lang.Exception
- if something goes wrongprotected abstract void run(Environment environment, net.sourceforge.argparse4j.inf.Namespace namespace, T configuration) throws java.lang.Exception
Environment
and Configuration
.environment
- the configured environmentnamespace
- the parsed command line namespaceconfiguration
- the configuration objectjava.lang.Exception
- if something goes wrongCopyright © 2018. All rights reserved.