public class CookieStoreImpl extends AbstractCookieStore
SessionEncoder
编码成字符串。cookieName0
,cookieName1
……
cookieNameN
。cookieNamesum
。
SessionStore.StoreContext
log
SURVIVES_IN_INVALIDATING_DEFAULT
Constructor and Description |
---|
CookieStoreImpl() |
Modifier and Type | Method and Description |
---|---|
void |
commit(Map<String,Object> modifiedAttrs,
String sessionID,
SessionStore.StoreContext storeContext)
保存指定session的attributes。
|
protected SessionEncoder |
createDefaultSessionEncoder() |
Iterable<String> |
getAttributeNames(String sessionID,
SessionStore.StoreContext storeContext)
取得指定session的所有attribute名称。
|
protected void |
init()
初始化cookie store。
|
void |
invaldiate(String sessionID,
SessionStore.StoreContext storeContext)
丢弃指定session ID的所有内容。
|
Object |
loadAttribute(String attrName,
String sessionID,
SessionStore.StoreContext storeContext)
装载指定session的某个attribute。
|
void |
setChecksum(boolean checksum) |
void |
setEncoders(SessionEncoder[] encoders) |
void |
setMaxCount(int maxCount) |
void |
setMaxLength(int maxLength) |
protected void |
toString(ToStringBuilder.MapBuilder mb) |
getDomain, getIdCookieConfig, getMaxAge, getName, getPath, getSecure, getStoreName, init, isHttpOnly, isSurvivesInInvalidating, setDomain, setHttpOnly, setMaxAge, setName, setPath, setSecure, setSurvivesInInvalidating, toString, writeCookie
public void setMaxLength(int maxLength)
public void setMaxCount(int maxCount)
public void setChecksum(boolean checksum)
public void setEncoders(SessionEncoder[] encoders)
protected void init()
AbstractCookieStore
init
in class AbstractCookieStore
protected SessionEncoder createDefaultSessionEncoder()
public Iterable<String> getAttributeNames(String sessionID, SessionStore.StoreContext storeContext)
SessionStore
sessionID
- 要装载的session IDstoreContext
- 用来取得request信息,并存放store当前的状态public Object loadAttribute(String attrName, String sessionID, SessionStore.StoreContext storeContext)
SessionStore
attrName
- 要装载的attribute名称sessionID
- 要存取的session IDstoreContext
- 用来取得request信息,并存放store当前的状态public void invaldiate(String sessionID, SessionStore.StoreContext storeContext)
SessionStore
sessionID
- 要丢弃的session IDstoreContext
- 用来取得request信息,并存放store当前的状态public void commit(Map<String,Object> modifiedAttrs, String sessionID, SessionStore.StoreContext storeContext)
SessionStore
modifiedAttrs
- 要保存的attrs,如果值为null
表示删除sessionID
- 要保存的sessionIDstoreContext
- 用来取得request信息,并存放store当前的状态protected void toString(ToStringBuilder.MapBuilder mb)
toString
in class AbstractCookieStore
Copyright © 2006–2018 TinyGroup. All rights reserved.