接口 WebSessionAttributeListener
- 所有超级接口:
EventListener
- 所有已知实现类:
SessionScope.DestructionCallback
This listener interface can be implemented in order to get notifications of
changes to the attribute lists of sessions within this web application.
- 从以下版本开始:
- 4.0 2022/10/30 14:37
- 作者:
- Harry Yang
-
方法概要
修饰符和类型方法说明default voidattributeAdded(WebSession session, String attributeName, Object value) Notification that an attribute has been added to a session.default voidattributeRemoved(WebSession session, String attributeName, Object value) Notification that an attribute has been removed from a session.default voidattributeReplaced(WebSession session, String attributeName, Object oldValue, Object newValue) Notification that an attribute has been replaced in a session.
-
方法详细资料
-
attributeAdded
Notification that an attribute has been added to a session. Called after the attribute is added. The default implementation is a NO-OP.- 参数:
session- web session to hold this attributeattributeName- name of attributevalue- attribute value
-
attributeRemoved
Notification that an attribute has been removed from a session. Called after the attribute is removed. The default implementation is a NO-OP.- 参数:
session- web session to hold this attributeattributeName- name of attributevalue- attribute value
-
attributeReplaced
default void attributeReplaced(WebSession session, String attributeName, Object oldValue, Object newValue) Notification that an attribute has been replaced in a session. Called after the attribute is replaced. The default implementation is a NO-OP.- 参数:
session- web session to hold this attributeattributeName- name of attributeoldValue- old attribute valuenewValue- new attribute value
-