|
|||||||||
| 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 ISessionManagerpublic HttpSession getSession(String sessionId)
getSession in interface ISessionManagersessionId - the session id
nullpublic Map<String,HttpSession> getSessionMap()
getSessionMap in interface ISessionManager
public void registerSession(HttpSession session)
throws IOException
registerSession in interface ISessionManagersession - the session
IOException - if an exception occurs
public void saveSession(String sessionId)
throws IOException
saveSession in interface ISessionManagerIOException - if an exception occurs
public String newSession(String idPrefix)
throws IOException
newSession in interface ISessionManageridPrefix - the id prefix
IOException - if an exception occurspublic void removeSession(String sessionId)
removeSession in interface ISessionManagerpublic void close()
close in interface Closeablepublic 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 | ||||||||