Package org.spincast.core.exchange
Class DefaultRequestContextDefault
java.lang.Object
org.spincast.core.exchange.RequestContextBase<DefaultRequestContext>
org.spincast.core.exchange.DefaultRequestContextDefault
- All Implemented Interfaces:
DefaultRequestContext
,RequestContext<DefaultRequestContext>
public class DefaultRequestContextDefault
extends RequestContextBase<DefaultRequestContext>
implements DefaultRequestContext
The default implementation of the request context.
We leave this implementation in the "spincast-core" artifact instead
of the "spincast-default" artifact because we want to be able to
use the SpincastCoreGuiceModule as is when creating a
Guice context. For example :
Injector guice = Guice.createInjector(new SpincastCoreGuiceModule(args),
new AnotherModule())
So SpincastCoreGuiceModule can't be
abstract
and
therefore we have to provide this method implementation :
protected Key<?> getRequestContextImplementationClass() {
return Key.get(DefaultRequestContext.class);
}
Some may want to start their application fron the "spincast-core" artifact
but with the default request context.-
Field Summary
-
Constructor Summary
ConstructorDescriptionDefaultRequestContextDefault
(Object exchange, RequestContextBaseDeps<DefaultRequestContext> requestContextBaseDeps) -
Method Summary
Methods inherited from class org.spincast.core.exchange.RequestContextBase
cacheHeaders, exchange, get, get, getCacheHeadersRequestContextAddonProvider, getInstanceFromGuiceCache, getJsonManager, getLocaleResolver, getLocaleToUse, getRequestRequestContextAddonProvider, getResponseRequestContextAddonProvider, getRoutingRequestContextAddonProvider, getTemplatingRequestContextAddonProvider, getTimeZoneResolver, getTimeZoneToUse, getVariablesRequestContextAddonProvider, getXmlManager, guice, json, request, response, routing, templating, toString, variables, xml
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.spincast.core.exchange.RequestContext
cacheHeaders, exchange, get, get, getLocaleToUse, getTimeZoneToUse, guice, json, request, response, routing, templating, variables, xml
-
Field Details
-
logger
protected static final org.slf4j.Logger logger
-
-
Constructor Details
-
DefaultRequestContextDefault
public DefaultRequestContextDefault(Object exchange, RequestContextBaseDeps<DefaultRequestContext> requestContextBaseDeps)
-