public.javadoc.org.spincast.defaults.bootstrapping.SpincastBootstrapper.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-website Show documentation
Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
SpincastBootstrapper (org.spincast:spincast-framework 1.14.0 API)
org.spincast.defaults.bootstrapping
Class SpincastBootstrapper
- java.lang.Object
-
- org.spincast.defaults.bootstrapping.SpincastBootstrapper
-
public class SpincastBootstrapper
extends Object
Builder to help initialize an application and create its
Guice context.
It is in general started using the static method
Spincast.configure()
.
-
-
Field Summary
Fields
Modifier and Type
Field and Description
protected static org.slf4j.Logger
logger
-
Constructor Summary
Constructors
Constructor and Description
SpincastBootstrapper()
-
Method Summary
-
-
Method Detail
-
getRequestContextImplementationClass
protected Class<? extends RequestContext<?>> getRequestContextImplementationClass()
-
getWebsocketContextImplementationClass
protected Class<? extends WebsocketContext<?>> getWebsocketContextImplementationClass()
-
getAppClass
protected Class<?> getAppClass()
-
isBindCallerClass
protected boolean isBindCallerClass()
-
isBindCallerClassSet
protected boolean isBindCallerClassSet()
-
isDisableAllDefaultPlugins
protected boolean isDisableAllDefaultPlugins()
-
isDisableCorePlugin
protected boolean isDisableCorePlugin()
-
isDisableDefaultRoutingPlugin
protected boolean isDisableDefaultRoutingPlugin()
-
isDisableDefaultJsonPlugin
protected boolean isDisableDefaultJsonPlugin()
-
isDisableDefaultXmlPlugin
protected boolean isDisableDefaultXmlPlugin()
-
isDisableDefaultRequestPlugin
protected boolean isDisableDefaultRequestPlugin()
-
isDisableDefaultResponsePlugin
protected boolean isDisableDefaultResponsePlugin()
-
isDisableDefaultTemplatingPlugin
protected boolean isDisableDefaultTemplatingPlugin()
-
isDisableDefaultTemplatingAddonPlugin
protected boolean isDisableDefaultTemplatingAddonPlugin()
-
isDisableDefaultVariablesPlugin
protected boolean isDisableDefaultVariablesPlugin()
-
isDisableDefaultLocaleResolverPlugin
protected boolean isDisableDefaultLocaleResolverPlugin()
-
isDisableDefaultTimeZoneResolverPlugin
protected boolean isDisableDefaultTimeZoneResolverPlugin()
-
isDisableDefaultHttpCachingPlugin
protected boolean isDisableDefaultHttpCachingPlugin()
-
isDisableDefaultCookiesPlugin
protected boolean isDisableDefaultCookiesPlugin()
-
isDisableDefaultConfigPlugin
protected boolean isDisableDefaultConfigPlugin()
-
isDisableDefaultDictionaryPlugin
protected boolean isDisableDefaultDictionaryPlugin()
-
isDisableDefaultServerPlugin
protected boolean isDisableDefaultServerPlugin()
-
getPlugins
protected List<SpincastPlugin> getPlugins()
-
getAppModules
protected Set<com.google.inject.Module> getAppModules()
-
requestContextImplementationClass
public SpincastBootstrapper requestContextImplementationClass(Class<? extends RequestContext<?>> clazz)
-
websocketContextImplementationClass
public SpincastBootstrapper websocketContextImplementationClass(Class<? extends WebsocketContext<?>> clazz)
-
bindCurrentClass
public SpincastBootstrapper bindCurrentClass(boolean bindCallerClass)
-
appClass
public SpincastBootstrapper appClass(Class<?> appClass)
Bind the specified class as the app class.
When this is called the "current class" won't be bound.
-
disableAllDefaultPlugins
public SpincastBootstrapper disableAllDefaultPlugins()
Disable all the default plugins (including the
core plugin).
If you use this, you're going to have to
bind implementations for all the
components required by a Spincast application,
by yourself.
-
disableCorePlugin
public SpincastBootstrapper disableCorePlugin()
Disables the default Core plugin.
-
disableDefaultRoutingPlugin
public SpincastBootstrapper disableDefaultRoutingPlugin()
Disables the default Routing plugin.
-
disableDefaultJsonPlugin
public SpincastBootstrapper disableDefaultJsonPlugin()
Disables the default Json plugin.
-
disableDefaultXmlPlugin
public SpincastBootstrapper disableDefaultXmlPlugin()
Disables the default XML plugin.
-
disableDefaultRequestPlugin
public SpincastBootstrapper disableDefaultRequestPlugin()
Disables the default Request plugin.
-
disableDefaultResponsePlugin
public SpincastBootstrapper disableDefaultResponsePlugin()
Disables the default Response plugin.
-
disableDefaultTemplatingPlugin
public SpincastBootstrapper disableDefaultTemplatingPlugin()
Disables the default Templating plugin.
-
disableDefaultTemplatingAddonPlugin
public SpincastBootstrapper disableDefaultTemplatingAddonPlugin()
Disables the default Templating add-on plugin.
-
disableDefaultVariablesPlugin
public SpincastBootstrapper disableDefaultVariablesPlugin()
Disables the default Variables add-on plugin.
-
disableDefaultLocaleResolverPlugin
public SpincastBootstrapper disableDefaultLocaleResolverPlugin()
Disables the default Locale Resolver plugin.
-
disableDefaultTimeZoneResolverPlugin
public SpincastBootstrapper disableDefaultTimeZoneResolverPlugin()
Disables the default TimeZone Resolver plugin.
-
disableDefaultHttpCachingPlugin
public SpincastBootstrapper disableDefaultHttpCachingPlugin()
Disables the default HTTP Caching plugin.
-
disableDefaultCookiesPlugin
public SpincastBootstrapper disableDefaultCookiesPlugin()
Disables the default Cookies plugin.
-
disableDefaultConfigPlugin
public SpincastBootstrapper disableDefaultConfigPlugin()
Disables the default Configuration plugin.
-
disableDefaultDictionaryPlugin
public SpincastBootstrapper disableDefaultDictionaryPlugin()
Disables the default Dictionary plugin.
-
disableDefaultServerPlugin
public SpincastBootstrapper disableDefaultServerPlugin()
Disables the default Server plugin.
-
module
public SpincastBootstrapper module(com.google.inject.Module module)
Adds a Guice module.
-
modules
public SpincastBootstrapper modules(List<com.google.inject.Module> modules)
Adds some Guice modules.
-
plugin
public SpincastBootstrapper plugin(SpincastPlugin plugin)
Adds a plugin.
Plugins will be applied in the order they are added.
-
plugins
public SpincastBootstrapper plugins(List<SpincastPlugin> plugins)
Adds some plugin.
Plugins will be applied in the order they are added.
-
init
public com.google.inject.Injector init(String[] mainArgs)
Create the Guice context and starts the
application.
- Parameters:
mainArgs
- the application main arguments.
Those will be automatically bound to :
@MainArgs String[]
and
@MainArgs List<String>
-
addCallerClassModule
protected Class<?> addCallerClassModule()
Adds a module to bind the caller class.
- Returns:
- the caller class
-
getCallerClassName
protected String getCallerClassName()
Returns the class name of the caller class.
-
addMainArgsModule
protected void addMainArgsModule(String[] mainArgs)
Adds a module to bind the main args.
-
getDefaultPlugins
protected List<SpincastPlugin> getDefaultPlugins()
Returns the default plugins, except those already
bound.
-
getDefaultPlugins
protected List<SpincastPlugin> getDefaultPlugins(boolean addCodePlugin)
Returns the default plugins, except those already
bound.
-
pluginBound
protected boolean pluginBound(Class<? extends SpincastPlugin> clazz)
-
getSpincastCorePlugin
protected SpincastCorePlugin getSpincastCorePlugin()
-
getSpincastConfigPlugin
protected SpincastConfigPlugin getSpincastConfigPlugin()
-
getSpincastRoutingPlugin
protected SpincastRoutingPlugin getSpincastRoutingPlugin()
-
getSpincastJacksonJsonPlugin
protected SpincastJacksonJsonPlugin getSpincastJacksonJsonPlugin()
-
getSpincastJacksonXmlPlugin
protected SpincastJacksonXmlPlugin getSpincastJacksonXmlPlugin()
-
getSpincastRequestPlugin
protected SpincastRequestPlugin getSpincastRequestPlugin()
-
getSpincastResponsePlugin
protected SpincastResponsePlugin getSpincastResponsePlugin()
-
getSpincastPebblePlugin
protected SpincastPebblePlugin getSpincastPebblePlugin()
-
getSpincastTemplatingAddonPlugin
protected SpincastTemplatingAddonPlugin getSpincastTemplatingAddonPlugin()
-
getSpincastVariablesPlugin
protected SpincastVariablesPlugin getSpincastVariablesPlugin()
-
getSpincastLocaleResolverPlugin
protected SpincastLocaleResolverPlugin getSpincastLocaleResolverPlugin()
-
getSpincastTimeZoneResolverPlugin
protected SpincastTimeZoneResolverPlugin getSpincastTimeZoneResolverPlugin()
-
getSpincastHttpCachingPlugin
protected SpincastHttpCachingPlugin getSpincastHttpCachingPlugin()
-
getSpincastDictionaryPlugin
protected SpincastDictionaryPlugin getSpincastDictionaryPlugin()
-
getSpincastUndertowPlugin
protected SpincastUndertowPlugin getSpincastUndertowPlugin()
-
setSpincastContextes
protected void setSpincastContextes(SpincastContextTypesInterested interested)
Sets the request and websocket contexts
on a component.
-
getDefaultModule
public static com.google.inject.Module getDefaultModule()
-
getDefaultModule
public static com.google.inject.Module getDefaultModule(boolean includeCoreModule)
-
getDefaultModule
public static com.google.inject.Module getDefaultModule(Class<? extends RequestContext<?>> requestContextImplementationClass,
Class<? extends WebsocketContext<?>> websocketContextImplementationClass)
-
getDefaultModule
public static com.google.inject.Module getDefaultModule(Class<? extends RequestContext<?>> requestContextImplementationClass,
Class<? extends WebsocketContext<?>> websocketContextImplementationClass,
boolean includeCoreModule)
-
getCoreAndDefaultModuleInternal
protected static com.google.inject.Module getCoreAndDefaultModuleInternal(Class<? extends RequestContext<?>> requestContextImplementationClass,
Class<? extends WebsocketContext<?>> websocketContextImplementationClass,
boolean addCodePlugin)
-
createModulesMapKey
protected static String createModulesMapKey(Class<? extends RequestContext<?>> requestContextImplementationClass,
Class<? extends WebsocketContext<?>> websocketContextImplementationClass,
boolean addCore)
Copyright © 2019. All rights reserved.