java.lang.Object
com.sun.faces.application.WebappLifecycleListener
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidcontextDestroyed(jakarta.servlet.ServletContextEvent event) Notification that the servlet context is about to be shut down.voidcontextInitialized(jakarta.servlet.ServletContextEvent event) Notification that the web application initialization process is starting.List<jakarta.servlet.http.HttpSession>voidrequestDestroyed(jakarta.servlet.ServletRequestEvent event) The request is about to go out of scope of the web application.voidrequestInitialized(jakarta.servlet.ServletRequestEvent event) The request is about to come into scope of the web application.voidsessionCreated(jakarta.servlet.http.HttpSessionEvent event) Notification that a session has been created.voidsessionDestroyed(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
-
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
-
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
-
sessionCreated
public void sessionCreated(jakarta.servlet.http.HttpSessionEvent event) Notification 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
-
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
-