- All Implemented Interfaces:
- IDefaultRequestContext, IRequestContext<IDefaultRequestContext>
public class DefaultRequestContext
extends RequestContextBase<IDefaultRequestContext>
implements IDefaultRequestContext
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.