类 AbstractWebSession
java.lang.Object
cn.taketoday.session.AbstractWebSession
- 所有已实现的接口:
WebSession
Session events supported WebSession
- 从以下版本开始:
- 4.0 2022/10/30 15:43
- 作者:
- Harry Yang
- 另请参阅:
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected booleanallowAttributeReplaced(Object value, Object oldValue) protected voidattributeAdded(String name, Object value) protected booleanattributeBinding(Object value, Object oldValue) Return the names Iterator.protected voidattributeRemoved(String name, Object attribute) protected voidattributeReplaced(String name, Object oldValue, Object value) protected final voidcopyAttributesFrom(WebSession source) Copy the attributes from the supplied AttributeAccessor to this accessor.protected voidgetAttribute(String name) Returns the object bound with the specified name in this session, ornullif no object is bound under the name.String[]Return the names of all attributes.Return attributes mapbooleanhasAttribute(String name) Returntrueif the attribute identified bynameexists.booleanReturnstrueif this map contains no key-value mappings.inthashCode()voidInvalidate the current session and clear session storage.removeAttribute(String name) Removes the object bound with the specified name from this session.voidsetAttribute(String name, Object value) Binds an object to this session, using the name specified.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cn.taketoday.session.WebSession
changeSessionId, getCreationTime, getId, getLastAccessTime, getMaxIdleTime, isExpired, isStarted, save, setLastAccessTime, setMaxIdleTime, start
-
字段详细资料
-
attributes
Map with String keys and Object values. -
eventDispatcher
-
-
构造器详细资料
-
AbstractWebSession
-
-
方法详细资料
-
setAttribute
从接口复制的说明:WebSessionBinds an object to this session, using the name specified. If an object of the same name is already bound to the session, the object is replaced.After this method executes, and if the new object implements
AttributeBindingListener, the container callsAttributeBindingListener.valueBound. The container then notifies anyHttpSessionAttributeListeners in the web application.If an object was already bound to this session of this name that implements
AttributeBindingListener, itsAttributeBindingListener.valueUnboundmethod is called.If the value passed in is null, this has the same effect as calling
removeAttribute().- 指定者:
setAttribute在接口中WebSession- 参数:
name- the name to which the object is bound; cannot be nullvalue- the object to be bound
-
attributeBinding
-
allowAttributeReplaced
-
attributeAdded
-
attributeReplaced
-
attributeRemoved
-
getAttribute
从接口复制的说明:WebSessionReturns the object bound with the specified name in this session, ornullif no object is bound under the name.- 指定者:
getAttribute在接口中WebSession- 参数:
name- a string specifying the name of the object- 返回:
- the object with the specified name
-
removeAttribute
从接口复制的说明:WebSessionRemoves the object bound with the specified name from this session. If the session does not have an object bound with the specified name, this method does nothing.After this method executes, and if the object implements
AttributeBindingListener, the container callsAttributeBindingListener.valueUnbound. The container then notifies anyWebSessionAttributeListeners in the web application.- 指定者:
removeAttribute在接口中WebSession- 参数:
name- the name of the object to remove from this session
-
invalidate
public void invalidate()从接口复制的说明:WebSessionInvalidate the current session and clear session storage.- 指定者:
invalidate在接口中WebSession
-
doInvalidate
protected void doInvalidate() -
hasAttribute
从接口复制的说明:WebSessionReturntrueif the attribute identified bynameexists. Otherwise returnfalse.- 指定者:
hasAttribute在接口中WebSession- 参数:
name- the unique attribute key
-
getAttributeNames
从接口复制的说明:WebSessionReturn the names of all attributes.- 指定者:
getAttributeNames在接口中WebSession
-
attributeNames
从接口复制的说明:WebSessionReturn the names Iterator.- 指定者:
attributeNames在接口中WebSession
-
copyAttributesFrom
Copy the attributes from the supplied AttributeAccessor to this accessor.- 参数:
source- the AttributeAccessor to copy from
-
hasAttributes
public boolean hasAttributes()Returnstrueif this map contains no key-value mappings.- 指定者:
hasAttributes在接口中WebSession- 返回:
trueif this map contains no key-value mappings
-
hashCode
public int hashCode() -
getAttributes
从接口复制的说明:WebSessionReturn attributes map- 指定者:
getAttributes在接口中WebSession- 返回:
- attributes map
-
createAttributes
-