F
- type of FirstTurn
L
- type of LastTurn
O
- type of OutputTurn
I
- type of InputTurn
C
- type of DialogueContext
public final class SessionContainer<I extends InputTurn,O extends OutputTurn,F extends FirstTurn,L extends LastTurn,C extends DialogueContext<I,O>> extends Object
Session
and check for expirations.
Rivr has its own SessionContainer independent from the Web server. This solves many issues related to cookies and encoding of session ID in the URI.
A clean-up thread checks periodically that every session has not timed-out.
The scan period and the session time-out value can be specified in the
constructor
,
although they are normally specified via the DialogueServlet
.
Constructor and Description |
---|
SessionContainer(Logger logger,
Duration sessionTimeout,
Duration timeoutCheckScanPeriod,
String name) |
Modifier and Type | Method and Description |
---|---|
void |
addSession(Session<I,O,F,L,C> session) |
Session<I,O,F,L,C> |
getSession(String sessionId) |
Collection<String> |
getSessionIds() |
void |
removeSession(String sessionId) |
void |
stop() |
public SessionContainer(Logger logger, Duration sessionTimeout, Duration timeoutCheckScanPeriod, String name)
public void removeSession(String sessionId)
public void stop()
public Collection<String> getSessionIds()
Copyright © 2019 Nu Echo Inc..