public class WebappLifecycleListener extends Object
Central location for web application lifecycle events.
The main purpose of this class is detect when we should be invoking methods marked with the @PreDestroy
annotation.
| Constructor and Description |
|---|
WebappLifecycleListener() |
WebappLifecycleListener(jakarta.servlet.ServletContext servletContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
attributeRemoved(jakarta.servlet.http.HttpSessionBindingEvent event)
Notification that an attribute has been removed from a session.
|
void |
attributeRemoved(jakarta.servlet.ServletContextAttributeEvent event)
Notification that an existing attribute has been removed from the servlet context.
|
void |
attributeRemoved(jakarta.servlet.ServletRequestAttributeEvent event)
Notification that an existing attribute has been removed from the servlet request.
|
void |
attributeReplaced(jakarta.servlet.http.HttpSessionBindingEvent event)
Notification that an attribute has been replaced in a session.
|
void |
attributeReplaced(jakarta.servlet.ServletContextAttributeEvent event)
Notification that an attribute on the servlet context has been replaced.
|
void |
attributeReplaced(jakarta.servlet.ServletRequestAttributeEvent event)
Notification that an attribute was replaced on the servlet request.
|
void |
contextDestroyed(jakarta.servlet.ServletContextEvent event)
Notification that the servlet context is about to be shut down.
|
void |
contextInitialized(jakarta.servlet.ServletContextEvent event)
Notification that the web application initialization process is starting.
|
List<jakarta.servlet.http.HttpSession> |
getActiveSessions() |
void |
requestDestroyed(jakarta.servlet.ServletRequestEvent event)
The request is about to go out of scope of the web application.
|
void |
requestInitialized(jakarta.servlet.ServletRequestEvent event)
The request is about to come into scope of the web application.
|
void |
sessionCreated(jakarta.servlet.http.HttpSessionEvent event)
Notfication that a session has been created.
|
void |
sessionDestroyed(jakarta.servlet.http.HttpSessionEvent event)
Notification that a session is about to be invalidated.
|
public WebappLifecycleListener()
public WebappLifecycleListener(jakarta.servlet.ServletContext servletContext)
public void requestDestroyed(jakarta.servlet.ServletRequestEvent event)
event - the notification eventpublic void requestInitialized(jakarta.servlet.ServletRequestEvent event)
event - the notification eventpublic void sessionCreated(jakarta.servlet.http.HttpSessionEvent event)
event - the notification eventpublic void sessionDestroyed(jakarta.servlet.http.HttpSessionEvent event)
event - the notification eventpublic void attributeRemoved(jakarta.servlet.ServletRequestAttributeEvent event)
event - the notification eventpublic void attributeReplaced(jakarta.servlet.ServletRequestAttributeEvent event)
event - the notification eventpublic void attributeRemoved(jakarta.servlet.http.HttpSessionBindingEvent event)
event - the nofication eventpublic void attributeReplaced(jakarta.servlet.http.HttpSessionBindingEvent event)
event - the notification eventpublic void attributeRemoved(jakarta.servlet.ServletContextAttributeEvent event)
event - the notification eventpublic void attributeReplaced(jakarta.servlet.ServletContextAttributeEvent event)
event - the notification eventpublic void contextInitialized(jakarta.servlet.ServletContextEvent event)
event - the notification eventpublic void contextDestroyed(jakarta.servlet.ServletContextEvent event)
event - the nofication eventpublic List<jakarta.servlet.http.HttpSession> getActiveSessions()
Copyright © 2010–2022 JBoss by Red Hat. All rights reserved.