public class WeiXinSessionManagerDefault extends Object implements WeiXinSessionManager
Modifier and Type | Field and Description |
---|---|
protected static Logger |
LOGGER |
DEFAULT_BEAN_NAME
Constructor and Description |
---|
WeiXinSessionManagerDefault() |
WeiXinSessionManagerDefault(int maxInactiveInterval,
int expireTimerDelay,
int expireTimePeriod) |
Modifier and Type | Method and Description |
---|---|
void |
addWeiXinSession(WeiXinSession session)
添加会话
|
void |
clear()
清理全部Session
|
WeiXinSession |
createWeiXinSession(String sessionId)
创建会话
|
void |
expireWeiXinSessions()
清理会话过期的Session
|
Cache |
getCache() |
CacheManager |
getCacheManager() |
String |
getCacheRegion() |
int |
getExpireTimePeriod()
Session清理线程运行周期,单位s,默认值300
|
int |
getExpireTimerDelay()
Session清理线程首次延迟时间,单位s,默认值60
|
int |
getMaxInactiveInterval()
Session最大过期时间设置,单位s,默认0
|
WeiXinSession |
getWeiXinSession(String sessionId)
查询会话
|
WeiXinSession[] |
getWeiXinSessions()
遍历会话
|
void |
removeWeiXinSession(String sessionId)
手动删除会话
|
void |
setCacheManager(CacheManager cacheManager) |
void |
setCacheRegion(String cacheRegion) |
void |
setExpireTimePeriod(int expireTimePeriod) |
void |
setExpireTimerDelay(int expireTimerDelay) |
void |
setMaxInactiveInterval(int maxInactiveInterval) |
protected static final Logger LOGGER
public WeiXinSessionManagerDefault()
public WeiXinSessionManagerDefault(int maxInactiveInterval, int expireTimerDelay, int expireTimePeriod)
public Cache getCache()
public CacheManager getCacheManager()
public void setCacheManager(CacheManager cacheManager)
public String getCacheRegion()
public void setCacheRegion(String cacheRegion)
public WeiXinSession createWeiXinSession(String sessionId)
WeiXinSessionManager
createWeiXinSession
in interface WeiXinSessionManager
public WeiXinSession getWeiXinSession(String sessionId)
WeiXinSessionManager
getWeiXinSession
in interface WeiXinSessionManager
public void addWeiXinSession(WeiXinSession session)
WeiXinSessionManager
addWeiXinSession
in interface WeiXinSessionManager
public void removeWeiXinSession(String sessionId)
WeiXinSessionManager
removeWeiXinSession
in interface WeiXinSessionManager
public void expireWeiXinSessions()
WeiXinSessionManager
expireWeiXinSessions
in interface WeiXinSessionManager
public WeiXinSession[] getWeiXinSessions()
WeiXinSessionManager
getWeiXinSessions
in interface WeiXinSessionManager
public void clear()
WeiXinSessionManager
clear
in interface WeiXinSessionManager
public int getMaxInactiveInterval()
WeiXinSessionManager
getMaxInactiveInterval
in interface WeiXinSessionManager
public void setMaxInactiveInterval(int maxInactiveInterval)
public int getExpireTimerDelay()
WeiXinSessionManager
getExpireTimerDelay
in interface WeiXinSessionManager
public void setExpireTimerDelay(int expireTimerDelay)
public int getExpireTimePeriod()
WeiXinSessionManager
getExpireTimePeriod
in interface WeiXinSessionManager
public void setExpireTimePeriod(int expireTimePeriod)
Copyright © 2006–2018 TinyGroup. All rights reserved.