org.tinygroup.weblayer.webcontext.session.store.impl
类 SingleValuedCookieStoreImpl
java.lang.Object
org.tinygroup.weblayer.webcontext.session.store.AbstractCookieStore
org.tinygroup.weblayer.webcontext.session.store.impl.SingleValuedCookieStoreImpl
- 所有已实现的接口:
- ExactMatchesOnlySessionStore, HttpHeaderSessionStore, SessionStore, CookieStore
public class SingleValuedCookieStoreImpl
- extends AbstractCookieStore
- implements ExactMatchesOnlySessionStore
将Session状态保存在cookie中。
- 每个store只能保存一个值。
- 将仅有的session attribute value用
SessionValueEncoder编码成字符串。
- 作者:
- Michael Zhou
| 从类 org.tinygroup.weblayer.webcontext.session.store.AbstractCookieStore 继承的方法 |
getDomain, getIdCookieConfig, getMaxAge, getName, getPath, getSecure, getStoreName, init, isHttpOnly, isSurvivesInInvalidating, setDomain, setHttpOnly, setMaxAge, setName, setPath, setSecure, setSurvivesInInvalidating, toString, writeCookie |
SingleValuedCookieStoreImpl
public SingleValuedCookieStoreImpl()
initAttributeNames
public void initAttributeNames(String[] attrNames)
- 从接口
ExactMatchesOnlySessionStore 复制的描述
- 设置所有精确匹配的attribute名称。
- 指定者:
- 接口
ExactMatchesOnlySessionStore 中的 initAttributeNames
setValueEncoders
public void setValueEncoders(SessionValueEncoder[] encoders)
init
protected void init()
throws Exception
- 从类
AbstractCookieStore 复制的描述
- 初始化cookie store。
- 覆盖:
- 类
AbstractCookieStore 中的 init
- 抛出:
Exception
createDefaultSessionValueEncoder
protected SessionValueEncoder createDefaultSessionValueEncoder()
throws Exception
- 抛出:
Exception
getAttributeNames
public Iterable<String> getAttributeNames(String sessionID,
SessionStore.StoreContext storeContext)
- 从接口
SessionStore 复制的描述
- 取得指定session的所有attribute名称。
- 指定者:
- 接口
SessionStore 中的 getAttributeNames
- 参数:
sessionID - 要装载的session IDstoreContext - 用来取得request信息,并存放store当前的状态
- 返回:
- attributes的列表
loadAttribute
public Object loadAttribute(String attrName,
String sessionID,
SessionStore.StoreContext storeContext)
- 从接口
SessionStore 复制的描述
- 装载指定session的某个attribute。
- 指定者:
- 接口
SessionStore 中的 loadAttribute
- 参数:
attrName - 要装载的attribute名称sessionID - 要存取的session IDstoreContext - 用来取得request信息,并存放store当前的状态
- 返回:
- attribute的值(如果存在的话)
invaldiate
public void invaldiate(String sessionID,
SessionStore.StoreContext storeContext)
- 从接口
SessionStore 复制的描述
- 丢弃指定session ID的所有内容。
- 指定者:
- 接口
SessionStore 中的 invaldiate
- 参数:
sessionID - 要丢弃的session IDstoreContext - 用来取得request信息,并存放store当前的状态
commit
public void commit(Map<String,Object> modifiedAttrs,
String sessionID,
SessionStore.StoreContext storeContext)
- 从接口
SessionStore 复制的描述
- 保存指定session的attributes。
- 指定者:
- 接口
SessionStore 中的 commit
- 参数:
modifiedAttrs - 要保存的attrs,如果值为null表示删除sessionID - 要保存的sessionIDstoreContext - 用来取得request信息,并存放store当前的状态
toString
protected void toString(org.tinygroup.commons.tools.ToStringBuilder.MapBuilder mb)
- 覆盖:
- 类
AbstractCookieStore 中的 toString
Copyright © 2006–2013 开源组织. All rights reserved.