public class BTGStandardSessionContext extends Object implements BTGSessionContext
| 限定符 | 构造器和说明 |
|---|---|
protected |
BTGStandardSessionContext() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
active(BTGSession session)
激活session
|
void |
addSession(BTGSession session)
添加一个session
|
void |
clear()
清空session容器
|
void |
clearTimeout()
清理超时的session
|
void |
disableCache()
禁用二级缓存
|
void |
enableCache()
启用二级缓存
|
Enumeration<String> |
getIds() |
long |
getLastClearTimeoutMillis() |
int |
getMaxClearTimeoutSeconds()
获取过期session清理机制触发周期(毫秒)
|
int |
getMaxUpdateLastActiveTimeSeconds() |
BTGSession |
getNewSession()
获取一个新的session
|
javax.servlet.ServletContext |
getServletContext()
获取ServletContext
|
BTGSession |
getSession(String sessionId)
根据session id获取一个session
|
static BTGStandardSessionContext |
getSessionContext() |
static BTGStandardSessionContext |
getSessionContext(javax.servlet.ServletContext servletContext) |
static BTGStandardSessionContext |
getSessionContext(javax.servlet.ServletContext servletContext,
BTGSessionDao sessionDao) |
String |
getSessionCookiePath() |
BTGSessionDao |
getSessionDao()
获取session存储器
|
BTGSessionIdGenerator |
getSessionIdGenerator()
获取sessionId生成器
|
String |
getSessionIdKey()
获取session id名称key
|
Hashtable<String,BTGSession> |
getSessions()
获取所有session
|
int |
getSessionTimeoutSeconds()
获取session超时时间
|
boolean |
isDisableSimpleSSO() |
boolean |
isUseCache()
获取是否启用二级缓存
|
void |
refreshSession(BTGSession session)
刷新一个session
|
void |
removeSession(String sessionId)
根据session id移除一个session
|
void |
setDisableSimpleSSO(boolean isDisableSimpleSSO) |
void |
setMaxClearTimeoutSeconds(int maxClearTimeoutSeconds)
设置过期session清理机制触发周期(毫秒)
|
void |
setMaxUpdateLastActiveTimeSeconds(int maxUpdateLastActiveTimeSeconds) |
void |
setServletContext(javax.servlet.ServletContext servletContext)
设置ServletContext
|
void |
setSessionCookiePath(String sessionCookiePath) |
void |
setSessionDao(BTGSessionDao sessionDao)
设置session存储器
|
void |
setSessionIdGenerator(BTGSessionIdGenerator sessionIdGenerator)
设置sessionId生成器
|
void |
setSessionIdKey(String sesssionIdKey)
设置session id名称key
|
void |
setSessionTimeoutSeconds(int sessionTimeoutSeconds)
设置session超时时间
|
void |
setUseCache(boolean useCache)
设置是否启用二级缓存
|
public static BTGStandardSessionContext getSessionContext()
public static BTGStandardSessionContext getSessionContext(javax.servlet.ServletContext servletContext)
public static BTGStandardSessionContext getSessionContext(javax.servlet.ServletContext servletContext, BTGSessionDao sessionDao)
public void enableCache()
BTGSessionContextenableCache 在接口中 BTGSessionContextpublic void disableCache()
BTGSessionContextdisableCache 在接口中 BTGSessionContextpublic void addSession(BTGSession session)
BTGSessionContextaddSession 在接口中 BTGSessionContextsession - BTGSessionpublic void removeSession(String sessionId)
BTGSessionContextremoveSession 在接口中 BTGSessionContextsessionId - Stringpublic void refreshSession(BTGSession session)
BTGSessionContextrefreshSession 在接口中 BTGSessionContextsession - BTGSessionpublic BTGSession getSession(String sessionId)
BTGSessionContextgetSession 在接口中 BTGSessionContextgetSession 在接口中 javax.servlet.http.HttpSessionContextsessionId - Stringpublic BTGSession getNewSession()
BTGSessionContextgetNewSession 在接口中 BTGSessionContextpublic void active(BTGSession session)
BTGSessionContextactive 在接口中 BTGSessionContextsession - sessionpublic Hashtable<String,BTGSession> getSessions()
BTGSessionContextgetSessions 在接口中 BTGSessionContextpublic void clearTimeout()
BTGSessionContextclearTimeout 在接口中 BTGSessionContextpublic void clear()
BTGSessionContextclear 在接口中 BTGSessionContextpublic String getSessionIdKey()
BTGSessionContextgetSessionIdKey 在接口中 BTGSessionContextpublic void setSessionIdKey(String sesssionIdKey)
BTGSessionContextsetSessionIdKey 在接口中 BTGSessionContextsesssionIdKey - Stringpublic int getSessionTimeoutSeconds()
BTGSessionContextgetSessionTimeoutSeconds 在接口中 BTGSessionContextpublic void setSessionTimeoutSeconds(int sessionTimeoutSeconds)
BTGSessionContextsetSessionTimeoutSeconds 在接口中 BTGSessionContextsessionTimeoutSeconds - longpublic String getSessionCookiePath()
public void setSessionCookiePath(String sessionCookiePath)
public boolean isDisableSimpleSSO()
public void setDisableSimpleSSO(boolean isDisableSimpleSSO)
public int getMaxClearTimeoutSeconds()
BTGSessionContextgetMaxClearTimeoutSeconds 在接口中 BTGSessionContextpublic void setMaxClearTimeoutSeconds(int maxClearTimeoutSeconds)
BTGSessionContextsetMaxClearTimeoutSeconds 在接口中 BTGSessionContextmaxClearTimeoutSeconds - intpublic int getMaxUpdateLastActiveTimeSeconds()
public void setMaxUpdateLastActiveTimeSeconds(int maxUpdateLastActiveTimeSeconds)
public long getLastClearTimeoutMillis()
public BTGSessionIdGenerator getSessionIdGenerator()
BTGSessionContextgetSessionIdGenerator 在接口中 BTGSessionContextpublic void setSessionIdGenerator(BTGSessionIdGenerator sessionIdGenerator)
BTGSessionContextsetSessionIdGenerator 在接口中 BTGSessionContextsessionIdGenerator - BTGSessionIdGeneratorpublic BTGSessionDao getSessionDao()
BTGSessionContextgetSessionDao 在接口中 BTGSessionContextpublic void setSessionDao(BTGSessionDao sessionDao)
BTGSessionContextsetSessionDao 在接口中 BTGSessionContextsessionDao - BTGSessionDaopublic Enumeration<String> getIds()
getIds 在接口中 javax.servlet.http.HttpSessionContextpublic javax.servlet.ServletContext getServletContext()
BTGSessionContextgetServletContext 在接口中 BTGSessionContextpublic void setServletContext(javax.servlet.ServletContext servletContext)
BTGSessionContextsetServletContext 在接口中 BTGSessionContextservletContext - ServletContextpublic boolean isUseCache()
BTGSessionContextisUseCache 在接口中 BTGSessionContextpublic void setUseCache(boolean useCache)
BTGSessionContextsetUseCache 在接口中 BTGSessionContextuseCache - useCacheCopyright © 2020. All rights reserved.