public class SessionManagerImpl extends Object implements SessionManager<Session>
| Modifier and Type | Field and Description |
|---|---|
private org.slf4j.Logger |
log
Class logger.
|
private String |
partition
Partition in which entries are stored.
|
private SecureRandom |
prng
A
SecureRandom PRNG to generate session IDs. |
private int |
sessionIDSize
Number of random bits within a session ID.
|
private long |
sessionLifetime
Lifetime, in milliseconds, of session.
|
private StorageService<String,SessionManagerEntry> |
sessionStore
Backing service used to store sessions.
|
| Constructor and Description |
|---|
SessionManagerImpl(StorageService<String,SessionManagerEntry> storageService,
long lifetime)
Constructor.
|
SessionManagerImpl(StorageService<String,SessionManagerEntry> storageService,
String storageParition,
long lifetime)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Session |
createSession() |
Session |
createSession(String principal) |
void |
destroySession(String sessionID) |
Session |
getSession(String sessionID) |
boolean |
indexSession(Session session,
String index) |
void |
removeSessionIndex(String index) |
private final org.slf4j.Logger log
private final int sessionIDSize
private final SecureRandom prng
SecureRandom PRNG to generate session IDs.private StorageService<String,SessionManagerEntry> sessionStore
private String partition
private long sessionLifetime
public SessionManagerImpl(StorageService<String,SessionManagerEntry> storageService, long lifetime)
storageService - service used to store sessionslifetime - lifetime, in milliseconds, of sessionspublic SessionManagerImpl(StorageService<String,SessionManagerEntry> storageService, String storageParition, long lifetime)
storageService - service used to store sessionstorageParition - partition in which sessions are storedlifetime - lifetime, in milliseconds, of sessionspublic Session createSession()
createSession in interface SessionManager<Session>public Session createSession(String principal)
createSession in interface SessionManager<Session>public void destroySession(String sessionID)
destroySession in interface SessionManager<Session>public Session getSession(String sessionID)
getSession in interface SessionManager<Session>public boolean indexSession(Session session, String index)
indexSession in interface SessionManager<Session>public void removeSessionIndex(String index)
removeSessionIndex in interface SessionManager<Session>Copyright © 1999-2014. All Rights Reserved.