T
- the type of configuration class for this applicationpublic abstract class Application<T extends Configuration> extends Object
Constructor and Description |
---|
Application() |
Modifier and Type | Method and Description |
---|---|
Class<T> |
getConfigurationClass()
Returns the
Class of the configuration class type parameter. |
String |
getName()
Returns the name of the application.
|
void |
initialize(Bootstrap<T> bootstrap)
Initializes the application bootstrap.
|
void |
run(String... arguments)
Parses command-line arguments and runs the application.
|
abstract void |
run(T configuration,
Environment environment)
When the application runs, this is called after the
Bundle s are run. |
public final Class<T> getConfigurationClass()
Class
of the configuration class type parameter.Generics.getTypeParameter(Class, Class)
public String getName()
public void initialize(Bootstrap<T> bootstrap)
bootstrap
- the application bootstrappublic abstract void run(T configuration, Environment environment) throws Exception
Bundle
s are run. Override it to add
providers, resources, etc. for your application.configuration
- the parsed Configuration
objectenvironment
- the application's Environment
Exception
- if something goes wrongCopyright © 2015. All rights reserved.