public static class SessionConfiguration.ConfigImpl extends Object implements SessionConfig
SessionConfig.CookieConfig, SessionConfig.IdConfig, SessionConfig.StoreMappingsConfig, SessionConfig.StoresConfig, SessionConfig.UrlEncodeConfig
BACKGROUD_PROCESSOR_DELAY_DEFAULT, FORCE_EXPIRATION_PERIOD_DEFAULT, KEEP_IN_TOUCH_DEFAULT, MAX_INACTIVE_INTERVAL_DEFAULT, MODEL_KEY_DEFAULT
Constructor and Description |
---|
ConfigImpl() |
Modifier and Type | Method and Description |
---|---|
int |
getBackgroundProcessorDelay()
监控session的后台线程休眠时间,单位为秒
|
long |
getForceExpirationPeriod()
Session强制作废期限(秒)。无论用户活动与否,从session创建之时算起,超过这个期限,session将被强制作废。值
0 表示永不作废。 |
SessionConfig.IdConfig |
getId()
取得session ID的配置。
|
int |
getMaxInactiveInterval()
Session的最长不活动时间(秒)。假如用户不活动,超过这个时限,session将被作废。值
0 表示永不过期。默认值设置为半小时 |
String |
getModelKey()
代表session model在session中被保存的键值。Session
model保存着当前session的状态,它也被保存在session中。在store-mappings设置中,你可以把session
model分配到一个session store中。
|
SessionInterceptor[] |
getSessionInterceptors()
取得用来监听session行为的interceptors。
|
String |
getSessionManagerBeanId()
sessionmanager的beanid
|
SessionModelEncoder[] |
getSessionModelEncoders()
取得model encoders。
|
SessionConfig.StoreMappingsConfig |
getStoreMappings()
取得所有store mappings。
|
SessionConfig.StoresConfig |
getStores()
取得所有stores。
|
String |
ignoreSessionCheckPattern()
忽略session过期时间检查的正则表达式,请求url如果与此表达式匹配,则不进行session过期时间检测
|
void |
init() |
boolean |
isKeepInTouch()
是否每次请求都touch session。如果设为
false ,只在session值有改变时touch。当将session
model保存在cookie store中时,这样做可以减少流量。 |
void |
setForceExpirationPeriod(long forceExpirationPeriod) |
void |
setKeepInTouch(boolean keepInTouch) |
void |
setMaxInactiveInterval(int maxInactiveInterval) |
void |
setModelKey(String modelKey) |
void |
setSessionInterceptors(SessionInterceptor[] sessionInterceptors) |
void |
setSessionModelEncoders(SessionModelEncoder[] sessionModelEncoders) |
String |
toString() |
public int getMaxInactiveInterval()
SessionConfig
0
表示永不过期。默认值设置为半小时getMaxInactiveInterval
in interface SessionConfig
public void setMaxInactiveInterval(int maxInactiveInterval)
public long getForceExpirationPeriod()
SessionConfig
0
表示永不作废。getForceExpirationPeriod
in interface SessionConfig
public void setForceExpirationPeriod(long forceExpirationPeriod)
public String getModelKey()
SessionConfig
getModelKey
in interface SessionConfig
public void setModelKey(String modelKey)
public String ignoreSessionCheckPattern()
SessionConfig
ignoreSessionCheckPattern
in interface SessionConfig
public boolean isKeepInTouch()
SessionConfig
false
,只在session值有改变时touch。当将session
model保存在cookie store中时,这样做可以减少流量。isKeepInTouch
in interface SessionConfig
public void setKeepInTouch(boolean keepInTouch)
public String getSessionManagerBeanId()
SessionConfig
getSessionManagerBeanId
in interface SessionConfig
public int getBackgroundProcessorDelay()
SessionConfig
getBackgroundProcessorDelay
in interface SessionConfig
public SessionConfig.IdConfig getId()
SessionConfig
getId
in interface SessionConfig
public SessionConfig.StoresConfig getStores()
SessionConfig
getStores
in interface SessionConfig
public SessionConfig.StoreMappingsConfig getStoreMappings()
SessionConfig
getStoreMappings
in interface SessionConfig
public SessionModelEncoder[] getSessionModelEncoders()
SessionConfig
getSessionModelEncoders
in interface SessionConfig
public void setSessionModelEncoders(SessionModelEncoder[] sessionModelEncoders)
public SessionInterceptor[] getSessionInterceptors()
SessionConfig
getSessionInterceptors
in interface SessionConfig
public void setSessionInterceptors(SessionInterceptor[] sessionInterceptors)
Copyright © 2006–2018 TinyGroup. All rights reserved.