public class App extends Object
main(...) method.| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
App(org.spincast.core.server.Server server,
AppConfig config,
AppRouter router,
AppController appController,
org.spincast.core.filters.SpincastFilters<AppRequestContext> spincastFilters)
The application constructor that Guice will call
with the required dependencies.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addRoutes()
Adds the application routes.
|
static com.google.inject.Injector |
createApp(String[] args,
com.google.inject.Module overridingModule)
Creates an App instance using the given
parameters, an overriding module, and returns the
Guice injector.
|
protected void |
displayStartedMessage()
Displays a message when the application is started.
|
protected AppController |
getAppController() |
protected static List<? extends com.google.inject.Module> |
getAppModules(String[] args)
The app's Guice modules to use.
|
protected AppConfig |
getConfig() |
protected AppRouter |
getRouter() |
protected org.spincast.core.server.Server |
getServer() |
protected org.spincast.core.filters.SpincastFilters<AppRequestContext> |
getSpincastFilters() |
static void |
main(String[] args)
The entry point for the application.
|
protected void |
start()
Once the application instance is created by Guice, start() is called
and the real work begins!
|
@Inject
public App(org.spincast.core.server.Server server,
AppConfig config,
AppRouter router,
AppController appController,
org.spincast.core.filters.SpincastFilters<AppRequestContext> spincastFilters)
public static void main(String[] args)
public static com.google.inject.Injector createApp(String[] args, com.google.inject.Module overridingModule)
overridingModule - Mostly useful for the integration tests. Those
can override some bindings by specifying this overriding module.protected static List<? extends com.google.inject.Module> getAppModules(String[] args)
protected AppConfig getConfig()
protected org.spincast.core.server.Server getServer()
protected AppRouter getRouter()
protected AppController getAppController()
protected org.spincast.core.filters.SpincastFilters<AppRequestContext> getSpincastFilters()
protected void start()
protected void addRoutes()
protected void displayStartedMessage()
Copyright © 2016. All rights reserved.