public class SessionDataContainer extends Object
Modifier and Type | Method and Description |
---|---|
void |
cleanExpiredUsersSessions()
Will run the process of cleaning expired sessions.
|
boolean |
containsKey(String key) |
Object |
GetData(String key)
Get data of session attached to current thread by key
|
Object |
GetData(String sessionId,
String key)
Get data by session and internal key
|
Object |
GetData(String sessionId,
String key,
boolean refresh)
Get data by session and internal key
|
static SessionDataContainer |
getInstance() |
void |
removeSession()
Remove the cached data of session The sessionId is retrieved from
ThreadLocal
|
void |
removeSession(String sessionId)
Remove the cached data of current session
|
boolean |
SetData(String key,
Object value)
This method will set user by session which is attached to thread
|
void |
SetData(String sessionId,
String key,
Object value) |
public static SessionDataContainer getInstance()
public final Object GetData(String key)
key
- - the internal keypublic final boolean SetData(String key, Object value)
key
- value
- public final Object GetData(String sessionId, String key)
sessionId
- - id of sessionkey
- - the internal keypublic final Object GetData(String sessionId, String key, boolean refresh)
sessionId
- - id of sessionkey
- - the internal keyrefresh
- - if perform refresh of sessionpublic final void removeSession()
public boolean containsKey(String key)
public final void removeSession(String sessionId)
sessionId
- - id of current sessionpublic final void cleanExpiredUsersSessions()
Copyright © 2012. All Rights Reserved.