Package com.sun.faces.application
Class WebappLifecycleListener
java.lang.Object
com.sun.faces.application.WebappLifecycleListener
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 Summary
Constructors Constructor Description WebappLifecycleListener()
WebappLifecycleListener(jakarta.servlet.ServletContext servletContext)
-
Method Summary
Modifier and Type Method 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.
-
Constructor Details
-
WebappLifecycleListener
public WebappLifecycleListener() -
WebappLifecycleListener
public WebappLifecycleListener(jakarta.servlet.ServletContext servletContext)
-
-
Method Details
-
requestDestroyed
public void requestDestroyed(jakarta.servlet.ServletRequestEvent event)The request is about to go out of scope of the web application.- Parameters:
event
- the notification event
-
requestInitialized
public void requestInitialized(jakarta.servlet.ServletRequestEvent event)The request is about to come into scope of the web application.- Parameters:
event
- the notification event
-
sessionCreated
public void sessionCreated(jakarta.servlet.http.HttpSessionEvent event)Notfication that a session has been created.- Parameters:
event
- the notification event
-
sessionDestroyed
public void sessionDestroyed(jakarta.servlet.http.HttpSessionEvent event)Notification that a session is about to be invalidated.- Parameters:
event
- the notification event
-
attributeRemoved
public void attributeRemoved(jakarta.servlet.ServletRequestAttributeEvent event)Notification that an existing attribute has been removed from the servlet request. Called after the attribute is removed.- Parameters:
event
- the notification event
-
attributeReplaced
public void attributeReplaced(jakarta.servlet.ServletRequestAttributeEvent event)Notification that an attribute was replaced on the servlet request. Called after the attribute is replaced.- Parameters:
event
- the notification event
-
attributeRemoved
public void attributeRemoved(jakarta.servlet.http.HttpSessionBindingEvent event)Notification that an attribute has been removed from a session. Called after the attribute is removed.- Parameters:
event
- the nofication event
-
attributeReplaced
public void attributeReplaced(jakarta.servlet.http.HttpSessionBindingEvent event)Notification that an attribute has been replaced in a session. Called after the attribute is replaced.- Parameters:
event
- the notification event
-
attributeRemoved
public void attributeRemoved(jakarta.servlet.ServletContextAttributeEvent event)Notification that an existing attribute has been removed from the servlet context. Called after the attribute is removed.- Parameters:
event
- the notification event
-
attributeReplaced
public void attributeReplaced(jakarta.servlet.ServletContextAttributeEvent event)Notification that an attribute on the servlet context has been replaced. Called after the attribute is replaced.- Parameters:
event
- the notification event
-
contextInitialized
public void contextInitialized(jakarta.servlet.ServletContextEvent event)Notification that the web application initialization process is starting. All ServletContextListeners are notified of context initialization before any filter or servlet in the web application is initialized.- Parameters:
event
- the notification event
-
contextDestroyed
public void contextDestroyed(jakarta.servlet.ServletContextEvent event)Notification that the servlet context is about to be shut down. All servlets and filters have been destroy()ed before any ServletContextListeners are notified of context destruction.- Parameters:
event
- the nofication event
-
getActiveSessions
-