T
- the Configuration
subclass which is loaded from the configuration filepublic class ServerCommand<T extends Configuration> extends EnvironmentCommand<T>
Modifier | Constructor | Description |
---|---|---|
|
ServerCommand(Application<T> application) |
|
protected |
ServerCommand(Application<T> application,
java.lang.String name,
java.lang.String description) |
A constructor to allow reuse of the server command as a different name
|
Modifier and Type | Method | Description |
---|---|---|
protected java.lang.Class<T> |
getConfigurationClass() |
Returns the
Class of the configuration type. |
protected 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, run
run
public ServerCommand(Application<T> application)
protected ServerCommand(Application<T> application, java.lang.String name, java.lang.String description)
application
- the application using this commandname
- the argument name to invoke this commanddescription
- a summary of what the command doesprotected java.lang.Class<T> getConfigurationClass()
ConfiguredCommand
Class
of the configuration type.getConfigurationClass
in class ConfiguredCommand<T extends Configuration>
Class
of the configuration typeprotected void run(Environment environment, net.sourceforge.argparse4j.inf.Namespace namespace, T configuration) throws java.lang.Exception
EnvironmentCommand
Environment
and Configuration
.run
in class EnvironmentCommand<T extends Configuration>
environment
- the configured environmentnamespace
- the parsed command line namespaceconfiguration
- the configuration objectjava.lang.Exception
- if something goes wrongCopyright © 2018. All rights reserved.