public class SingleValuedCookieStoreImpl extends AbstractCookieStore implements ExactMatchesOnlySessionStore
SessionValueEncoder
编码成字符串。SessionStore.StoreContext
log
SURVIVES_IN_INVALIDATING_DEFAULT
Constructor and Description |
---|
SingleValuedCookieStoreImpl() |
Modifier and Type | Method and Description |
---|---|
void |
commit(Map<String,Object> modifiedAttrs,
String sessionID,
SessionStore.StoreContext storeContext)
保存指定session的attributes。
|
protected SessionValueEncoder |
createDefaultSessionValueEncoder() |
Iterable<String> |
getAttributeNames(String sessionID,
SessionStore.StoreContext storeContext)
取得指定session的所有attribute名称。
|
protected void |
init()
初始化cookie store。
|
void |
initAttributeNames(String[] attrNames)
设置所有精确匹配的attribute名称。
|
void |
invaldiate(String sessionID,
SessionStore.StoreContext storeContext)
丢弃指定session ID的所有内容。
|
Object |
loadAttribute(String attrName,
String sessionID,
SessionStore.StoreContext storeContext)
装载指定session的某个attribute。
|
void |
setValueEncoders(SessionValueEncoder[] encoders) |
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
init
public void initAttributeNames(String[] attrNames)
ExactMatchesOnlySessionStore
initAttributeNames
in interface ExactMatchesOnlySessionStore
public void setValueEncoders(SessionValueEncoder[] encoders)
protected void init() throws Exception
AbstractCookieStore
init
in class AbstractCookieStore
Exception
protected SessionValueEncoder createDefaultSessionValueEncoder() throws Exception
Exception
public Iterable<String> getAttributeNames(String sessionID, SessionStore.StoreContext storeContext)
SessionStore
getAttributeNames
in interface SessionStore
sessionID
- 要装载的session IDstoreContext
- 用来取得request信息,并存放store当前的状态public Object loadAttribute(String attrName, String sessionID, SessionStore.StoreContext storeContext)
SessionStore
loadAttribute
in interface SessionStore
attrName
- 要装载的attribute名称sessionID
- 要存取的session IDstoreContext
- 用来取得request信息,并存放store当前的状态public void invaldiate(String sessionID, SessionStore.StoreContext storeContext)
SessionStore
invaldiate
in interface SessionStore
sessionID
- 要丢弃的session IDstoreContext
- 用来取得request信息,并存放store当前的状态public void commit(Map<String,Object> modifiedAttrs, String sessionID, SessionStore.StoreContext storeContext)
SessionStore
commit
in interface 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.