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中。

作者:
Michael Zhou

嵌套类摘要
 
从接口 org.tinygroup.weblayer.webcontext.session.SessionStore 继承的嵌套类/接口
SessionStore.StoreContext
 
字段摘要
 
从类 org.tinygroup.weblayer.webcontext.session.store.AbstractCookieStore 继承的字段
log
 
从接口 org.tinygroup.weblayer.webcontext.session.store.CookieStore 继承的字段
SURVIVES_IN_INVALIDATING_DEFAULT
 
构造方法摘要
SingleValuedCookieStoreImpl()
           
 
方法摘要
 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(org.tinygroup.commons.tools.ToStringBuilder.MapBuilder mb)
           
 
从类 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
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
从接口 org.tinygroup.weblayer.webcontext.session.SessionStore 继承的方法
init
 

构造方法详细信息

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 ID
storeContext - 用来取得request信息,并存放store当前的状态
返回:
attributes的列表

loadAttribute

public Object loadAttribute(String attrName,
                            String sessionID,
                            SessionStore.StoreContext storeContext)
从接口 SessionStore 复制的描述
装载指定session的某个attribute。

指定者:
接口 SessionStore 中的 loadAttribute
参数:
attrName - 要装载的attribute名称
sessionID - 要存取的session ID
storeContext - 用来取得request信息,并存放store当前的状态
返回:
attribute的值(如果存在的话)

invaldiate

public void invaldiate(String sessionID,
                       SessionStore.StoreContext storeContext)
从接口 SessionStore 复制的描述
丢弃指定session ID的所有内容。

指定者:
接口 SessionStore 中的 invaldiate
参数:
sessionID - 要丢弃的session ID
storeContext - 用来取得request信息,并存放store当前的状态

commit

public void commit(Map<String,Object> modifiedAttrs,
                   String sessionID,
                   SessionStore.StoreContext storeContext)
从接口 SessionStore 复制的描述
保存指定session的attributes。

指定者:
接口 SessionStore 中的 commit
参数:
modifiedAttrs - 要保存的attrs,如果值为null表示删除
sessionID - 要保存的sessionID
storeContext - 用来取得request信息,并存放store当前的状态

toString

protected void toString(org.tinygroup.commons.tools.ToStringBuilder.MapBuilder mb)
覆盖:
AbstractCookieStore 中的 toString


Copyright © 2006–2014 开源组织. All rights reserved.