- 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.