public.javadoc.org.spincast.core.guice.SpincastGuiceModuleBase.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.
SpincastGuiceModuleBase (org.spincast:spincast-framework 1.0.0 API)
org.spincast.core.guice
Class SpincastGuiceModuleBase
- java.lang.Object
-
- com.google.inject.AbstractModule
-
- org.spincast.core.guice.SpincastGuiceModuleBase
-
- All Implemented Interfaces:
- com.google.inject.Module, SpincastContextTypesInterested
- Direct Known Subclasses:
- SpincastAttemptsLimiterPluginModule, SpincastConfigPluginModule, SpincastCorePluginModule, SpincastCryptoPluginModule, SpincastDateFormatterPluginModule, SpincastDictionaryPluginModule, SpincastFlywayUtilsPluginModule, SpincastFormsProtectionPluginModule, SpincastHotSwapPluginModule, SpincastHttpCachingPluginModule, SpincastHttpClientPluginModule, SpincastJacksonJsonPluginModule, SpincastJacksonXmlPluginModule, SpincastJdbcPluginModule, SpincastLocaleResolverPluginModule, SpincastPebblePluginModule, SpincastRequestPluginModule, SpincastResponsePluginModule, SpincastRoutingPluginModule, SpincastScheduledTasksPluginModule, SpincastSessionPluginModule, SpincastTemplatingAddonPluginModule, SpincastTimeZoneResolverPluginModule, SpincastUndertowPluginModule, SpincastVariablesPluginModule, SpincastWatermarkerPluginModule
public abstract class SpincastGuiceModuleBase
extends com.google.inject.AbstractModule
implements SpincastContextTypesInterested
Base class for a Spincast Guice module.
-
-
Constructor Summary
Constructors
Constructor and Description
SpincastGuiceModuleBase()
SpincastGuiceModuleBase(Class<? extends RequestContext<?>> requestContextImplementationClass,
Class<? extends WebsocketContext<?>> websocketContextImplementationClass)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods
Modifier and Type
Method and Description
protected abstract void
configure()
protected Class<? extends RequestContext<?>>
getRequestContextImplementationClass()
protected Class<? extends RequestContext<?>>
getRequestContextInterface()
protected Class<? extends WebsocketContext<?>>
getWebsocketContextImplementationClass()
protected Type
getWebsocketContextInterface()
protected void
install(com.google.inject.Module module)
protected <T> com.google.inject.Key<T>
parameterizeWithContextInterfaces(Class<T> clazz)
Get a version of the specified class parameterized with the
request and Websocket context types.
protected <T> com.google.inject.Key<T>
parameterizeWithRequestContext(Class<T> clazz)
Get a version of the specified class parameterized with the
request context type.
protected <T> com.google.inject.Key<T>
parameterizeWithWebsocketContext(Class<T> clazz)
Get a version of the specified class parameterized with the
Websocket context type.
void
setRequestContextImplementationClass(Class<? extends RequestContext<?>> requestContextImplementationClass)
The implementation class to use for RequestContext.
void
setWebsocketContextImplementationClass(Class<? extends WebsocketContext<?>> websocketContextImplementationClass)
The implementation class to use for WebsocletContext.
-
Methods inherited from class com.google.inject.AbstractModule
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, requestInjection, requestStaticInjection, requireBinding, requireBinding
-
-
Constructor Detail
-
SpincastGuiceModuleBase
public SpincastGuiceModuleBase()
-
SpincastGuiceModuleBase
public SpincastGuiceModuleBase(Class<? extends RequestContext<?>> requestContextImplementationClass,
Class<? extends WebsocketContext<?>> websocketContextImplementationClass)
-
Method Detail
-
getRequestContextImplementationClass
protected Class<? extends RequestContext<?>> getRequestContextImplementationClass()
-
getWebsocketContextImplementationClass
protected Class<? extends WebsocketContext<?>> getWebsocketContextImplementationClass()
-
setRequestContextImplementationClass
public void setRequestContextImplementationClass(Class<? extends RequestContext<?>> requestContextImplementationClass)
Description copied from interface: SpincastContextTypesInterested
The implementation class to use for RequestContext.
- Specified by:
setRequestContextImplementationClass
in interface SpincastContextTypesInterested
-
setWebsocketContextImplementationClass
public void setWebsocketContextImplementationClass(Class<? extends WebsocketContext<?>> websocketContextImplementationClass)
Description copied from interface: SpincastContextTypesInterested
The implementation class to use for WebsocletContext.
- Specified by:
setWebsocketContextImplementationClass
in interface SpincastContextTypesInterested
-
getRequestContextInterface
protected Class<? extends RequestContext<?>> getRequestContextInterface()
-
getWebsocketContextInterface
protected Type getWebsocketContextInterface()
-
parameterizeWithRequestContext
protected <T> com.google.inject.Key<T> parameterizeWithRequestContext(Class<T> clazz)
Get a version of the specified class parameterized with the
request context type.
-
parameterizeWithWebsocketContext
protected <T> com.google.inject.Key<T> parameterizeWithWebsocketContext(Class<T> clazz)
Get a version of the specified class parameterized with the
Websocket context type.
-
parameterizeWithContextInterfaces
protected <T> com.google.inject.Key<T> parameterizeWithContextInterfaces(Class<T> clazz)
Get a version of the specified class parameterized with the
request and Websocket context types.
-
install
protected void install(com.google.inject.Module module)
- Overrides:
install
in class com.google.inject.AbstractModule
-
configure
protected abstract void configure()
- Overrides:
configure
in class com.google.inject.AbstractModule
Copyright © 2019. All rights reserved.