public class CookieBasedSessionsModule extends ConfigurableModule<CookieBasedSessionsModule.Config> implements HandlerDecoratingModule
SessionStorage - deserialized from the client's cookie
This module decorates the handler to make
the SessionStorage available during request processing.
import ratpack.handling.*;
import ratpack.session.store.SessionStorage;
class MyHandler implements Handler {
void handle(Context ctx) {
SessionStorage session = ctx.get(SessionStorage.class);
}
}
| Modifier and Type | Class and Description |
|---|---|
static class |
CookieBasedSessionsModule.Config |
| Constructor and Description |
|---|
CookieBasedSessionsModule() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configure() |
Handler |
decorate(Injector injector,
Handler handler)
Makes
SessionStorage available in the context registry. |
configure, createConfig, defaultConfigaddError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBindingprotected void configure()
configure in class AbstractModulepublic Handler decorate(Injector injector, Handler handler)
SessionStorage available in the context registry.decorate in interface HandlerDecoratingModuleinjector - The injector created from all the application moduleshandler - The application handlerSessionStorage impl in the context registry