public interface BTGSessionContext extends javax.servlet.http.HttpSessionContext, Serializable
| 限定符和类型 | 方法和说明 |
|---|---|
void |
active(BTGSession session)
激活session
|
void |
addSession(BTGSession session)
添加一个session
|
void |
clear()
清空session容器
|
void |
clearTimeout()
清理超时的session
|
void |
disableCache()
禁用二级缓存
|
void |
enableCache()
启用二级缓存
|
int |
getMaxClearTimeoutSeconds()
获取过期session清理机制触发周期(毫秒)
|
BTGSession |
getNewSession()
获取一个新的session
|
javax.servlet.ServletContext |
getServletContext()
获取ServletContext
|
BTGSession |
getSession(String sessionId)
根据session id获取一个session
|
BTGSessionDao |
getSessionDao()
获取session存储器
|
BTGSessionIdGenerator |
getSessionIdGenerator()
获取sessionId生成器
|
String |
getSessionIdKey()
获取session id名称key
|
Hashtable<String,BTGSession> |
getSessions()
获取所有session
|
int |
getSessionTimeoutSeconds()
获取session超时时间
|
boolean |
isUseCache()
获取是否启用二级缓存
|
void |
refreshSession(BTGSession session)
刷新一个session
|
void |
removeSession(String sessionId)
根据session id移除一个session
|
void |
setMaxClearTimeoutSeconds(int maxClearTimeoutSeconds)
设置过期session清理机制触发周期(毫秒)
|
void |
setServletContext(javax.servlet.ServletContext servletContext)
设置ServletContext
|
void |
setSessionDao(BTGSessionDao sessionDao)
设置session存储器
|
void |
setSessionIdGenerator(BTGSessionIdGenerator sessionIdGenerator)
设置sessionId生成器
|
void |
setSessionIdKey(String sessionIdKey)
设置session id名称key
|
void |
setSessionTimeoutSeconds(int sessionTimeout)
设置session超时时间
|
void |
setUseCache(boolean useCache)
设置是否启用二级缓存
|
void enableCache()
void disableCache()
void addSession(BTGSession session)
session - BTGSessionvoid removeSession(String sessionId)
sessionId - StringBTGSession getSession(String sessionId)
getSession 在接口中 javax.servlet.http.HttpSessionContextsessionId - StringBTGSession getNewSession()
void refreshSession(BTGSession session)
session - BTGSessionvoid active(BTGSession session)
session - sessionHashtable<String,BTGSession> getSessions()
void clearTimeout()
void clear()
String getSessionIdKey()
void setSessionIdKey(String sessionIdKey)
sessionIdKey - Stringint getSessionTimeoutSeconds()
void setSessionTimeoutSeconds(int sessionTimeout)
sessionTimeout - longint getMaxClearTimeoutSeconds()
void setMaxClearTimeoutSeconds(int maxClearTimeoutSeconds)
maxClearTimeoutSeconds - intBTGSessionIdGenerator getSessionIdGenerator()
void setSessionIdGenerator(BTGSessionIdGenerator sessionIdGenerator)
sessionIdGenerator - BTGSessionIdGeneratorBTGSessionDao getSessionDao()
void setSessionDao(BTGSessionDao sessionDao)
sessionDao - BTGSessionDaojavax.servlet.ServletContext getServletContext()
void setServletContext(javax.servlet.ServletContext servletContext)
servletContext - ServletContextboolean isUseCache()
void setUseCache(boolean useCache)
useCache - useCacheCopyright © 2020. All rights reserved.