Package javax.servlet.http
Interface HttpSessionListener
-
- All Superinterfaces:
EventListener
public interface HttpSessionListener extends EventListener
Interface for receiving notification events about HttpSession lifecycle changes.In order to receive these notification events, the implementation class must be either declared in the deployment descriptor of the web application, annotated with
WebListener
, or registered via one of the addListener methods defined onServletContext
.Implementations of this interface are invoked at their
sessionCreated(javax.servlet.http.HttpSessionEvent)
method in the order in which they have been declared, and at theirsessionDestroyed(javax.servlet.http.HttpSessionEvent)
method in reverse order.- Since:
- Servlet 2.3
- See Also:
HttpSessionEvent
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
sessionCreated(HttpSessionEvent se)
Receives notification that a session has been created.default void
sessionDestroyed(HttpSessionEvent se)
Receives notification that a session is about to be invalidated.
-
-
-
Method Detail
-
sessionCreated
default void sessionCreated(HttpSessionEvent se)
Receives notification that a session has been created.- Implementation Requirements:
- The default implementation takes no action.
- Parameters:
se
- the HttpSessionEvent containing the session
-
sessionDestroyed
default void sessionDestroyed(HttpSessionEvent se)
Receives notification that a session is about to be invalidated.- Implementation Requirements:
- The default implementation takes no action.
- Parameters:
se
- the HttpSessionEvent containing the session
-
-