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.IServer server,
IAppConfig config,
IAppRouter router,
IAppController appController,
org.spincast.core.filters.ISpincastFilters<IAppRequestContext> spincastFilters)
The application constructor which 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 IAppController |
getAppController() |
protected static List<? extends com.google.inject.Module> |
getAppModules(String[] args)
The app's Guice modules to use.
|
protected IAppConfig |
getConfig() |
protected IAppRouter |
getRouter() |
protected org.spincast.core.server.IServer |
getServer() |
protected org.spincast.core.filters.ISpincastFilters<IAppRequestContext> |
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.IServer server,
IAppConfig config,
IAppRouter router,
IAppController appController,
org.spincast.core.filters.ISpincastFilters<IAppRequestContext> 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 IAppConfig getConfig()
protected org.spincast.core.server.IServer getServer()
protected IAppRouter getRouter()
protected IAppController getAppController()
protected org.spincast.core.filters.ISpincastFilters<IAppRequestContext> getSpincastFilters()
protected void start()
protected void addRoutes()
protected void displayStartedMessage()
Copyright © 2016. All rights reserved.