类 WebSessionMutexListener
java.lang.Object
cn.taketoday.web.util.WebSessionMutexListener
- 所有已实现的接口:
WebSessionListener,EventListener
WebSessionListener that automatically exposes the session mutex
when an WebSession gets created. To be registered as a listener in
web.xml.
The session mutex is guaranteed to be the same object during
the entire lifetime of the session, available under the key defined
by the SESSION_MUTEX_ATTRIBUTE constant. It serves as a
safe reference to synchronize on for locking on the current session.
In many cases, the WebSession reference itself is a safe mutex as well, since it will always be the same object reference for the same active logical session. However, this is not guaranteed across different containers; the only 100% safe way is a session mutex.
- 从以下版本开始:
- 4.0 2022/4/9 09:58
- 作者:
- Juergen Hoeller, Harry Yang
- 另请参阅:
-
嵌套类概要
嵌套类 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidsessionCreated(WebSessionEvent event) Receives notification that a session has been created.voidsessionDestroyed(WebSessionEvent event) Receives notification that a session is about to be invalidated.
-
构造器详细资料
-
WebSessionMutexListener
public WebSessionMutexListener()
-
-
方法详细资料
-
sessionCreated
从接口复制的说明:WebSessionListenerReceives notification that a session has been created.The default implementation takes no action.
- 指定者:
sessionCreated在接口中WebSessionListener- 参数:
event- the WebSessionEvent containing the session
-
sessionDestroyed
从接口复制的说明:WebSessionListenerReceives notification that a session is about to be invalidated.The default implementation takes no action.
- 指定者:
sessionDestroyed在接口中WebSessionListener- 参数:
event- the WebSessionEvent containing the session
-