|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xlightweb.server.SessionManager
public class SessionManager
In-memory SessionManager implementation.
Field Summary | |
---|---|
static Logger |
LOG
|
Constructor Summary | |
---|---|
SessionManager()
constructor |
Method Summary | |
---|---|
void |
close()
|
int |
getNumCreatedSessions()
|
int |
getNumExpiredSessions()
|
int |
getNumRemovedSessions()
|
HttpSession |
getSession(String sessionId)
returns the session for a session id |
Map<String,HttpSession> |
getSessionMap()
return the session map |
boolean |
isEmtpy()
returns true, if no session exists |
String |
newSession(String idPrefix)
creates a new session |
void |
registerSession(HttpSession session)
registers a session |
void |
removeSession(String sessionId)
removes a session |
void |
saveSession(String sessionId)
save the session |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Logger LOG
Constructor Detail |
---|
public SessionManager()
Method Detail |
---|
public boolean isEmtpy()
isEmtpy
in interface ISessionManager
public HttpSession getSession(String sessionId)
getSession
in interface ISessionManager
sessionId
- the session id
null
public Map<String,HttpSession> getSessionMap()
getSessionMap
in interface ISessionManager
public void registerSession(HttpSession session) throws IOException
registerSession
in interface ISessionManager
session
- the session
IOException
- if an exception occurspublic void saveSession(String sessionId) throws IOException
saveSession
in interface ISessionManager
IOException
- if an exception occurspublic String newSession(String idPrefix) throws IOException
newSession
in interface ISessionManager
idPrefix
- the id prefix
IOException
- if an exception occurspublic void removeSession(String sessionId)
removeSession
in interface ISessionManager
public void close()
close
in interface Closeable
public int getNumCreatedSessions()
public int getNumRemovedSessions()
public int getNumExpiredSessions()
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |