public class MapSessionsModule extends AbstractModule
SessionStore
.
SessionStorage
- using an in-memory (i.e. non persistent) cacheSessionManager
(can be provided by SessionModule
)
import ratpack.handling.*; import ratpack.session.store.SessionStorage; class MyHandler implements Handler { void handle(Context ctx) { SessionStorage session = ctx.getRequest().get(SessionStorage.class); } }
Constructor and Description |
---|
MapSessionsModule(int maxEntries,
int idleTimeoutMinutes)
Creates a new module with the given configuration for session storage.
|
Modifier and Type | Method and Description |
---|---|
protected void |
configure() |
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
public MapSessionsModule(int maxEntries, int idleTimeoutMinutes)
maxEntries
- The number of maximum sessions to store (old sessions are evicted according to LRU)idleTimeoutMinutes
- How long a session can be idle before its considered inactive and able to be evictedprotected void configure()
configure
in class AbstractModule