Package org.spincast.core.exchange
Class RequestContextBase<R extends RequestContext<R>>
java.lang.Object
org.spincast.core.exchange.RequestContextBase<R>
- Direct Known Subclasses:
AppRequestContextDefault
,AppRequestContextDefault
,AppRequestContextDefault
,DefaultRequestContextDefault
The base implementation for a request context object.
When you extend this class, don't forget to annotate
the constructor with @AssistedInject and
the exchange
parameter as
@Assisted !
We need to inject *providers* for the add-ons because they depend on the request context this class build! {@link https://github.com/google/guice/wiki/CyclicDependencies#break-the-cycle-with-a-provider}
-
Field Summary
-
Constructor Summary
ConstructorDescriptionRequestContextBase
(Object exchange, RequestContextBaseDeps<R> requestContextBaseDeps) Constructor -
Method Summary
Modifier and TypeMethodDescriptionexchange()
<T> T
get
(com.google.inject.Key<T> key) <T> T
protected com.google.inject.Provider<CacheHeadersRequestContextAddon<R>>
protected JsonManager
protected LocaleResolver
protected com.google.inject.Provider<RequestRequestContextAddon<R>>
protected com.google.inject.Provider<ResponseRequestContextAddon<R>>
protected com.google.inject.Provider<RoutingRequestContextAddon<R>>
protected com.google.inject.Provider<TemplatingRequestContextAddon<R>>
protected TimeZoneResolver
protected com.google.inject.Provider<VariablesRequestContextAddon<R>>
protected XmlManager
com.google.inject.Injector
guice()
json()
request()
response()
routing()
toString()
xml()
-
Field Details
-
logger
protected static final org.slf4j.Logger logger
-
-
Constructor Details
-
RequestContextBase
Constructor
-
-
Method Details
-
guice
public com.google.inject.Injector guice() -
exchange
-
getLocaleResolver
-
getLocaleToUse
-
getTimeZoneResolver
-
getTimeZoneToUse
-
getJsonManager
-
getXmlManager
-
getRequestRequestContextAddonProvider
protected com.google.inject.Provider<RequestRequestContextAddon<R>> getRequestRequestContextAddonProvider() -
getRoutingRequestContextAddonProvider
protected com.google.inject.Provider<RoutingRequestContextAddon<R>> getRoutingRequestContextAddonProvider() -
getResponseRequestContextAddonProvider
protected com.google.inject.Provider<ResponseRequestContextAddon<R>> getResponseRequestContextAddonProvider() -
getVariablesRequestContextAddonProvider
protected com.google.inject.Provider<VariablesRequestContextAddon<R>> getVariablesRequestContextAddonProvider() -
getTemplatingRequestContextAddonProvider
protected com.google.inject.Provider<TemplatingRequestContextAddon<R>> getTemplatingRequestContextAddonProvider() -
getCacheHeadersRequestContextAddonProvider
protected com.google.inject.Provider<CacheHeadersRequestContextAddon<R>> getCacheHeadersRequestContextAddonProvider() -
getInstanceFromGuiceCache
-
variables
-
request
-
response
-
routing
-
templating
-
cacheHeaders
-
json
-
xml
-
get
-
get
public <T> T get(com.google.inject.Key<T> key) -
toString
-