Top Description Fields Constructors Methods
com.sun.faces.application

public Class WebappLifecycleListener

extends Object
Class Inheritance
Static Imports
com.sun.faces.application.view.ViewScopeManager.ACTIVE_VIEW_MAPS, .ViewScopeManager.VIEW_SCOPE_MANAGER, com.sun.faces.cdi.clientwindow.ClientWindowScopeManager.CLIENT_WINDOW_SCOPE_MANAGER, com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter.EnableDistributable, java.util.Arrays.asList

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.

Field Summary

Modifier and TypeField and Description
private final Set<HttpSession>
private ApplicationAssociate
private ServletContext

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public void
contextDestroyed(ServletContextEvent
the nofication event
event
)

Notification that the servlet context is about to be shut down.

public void
contextInitialized(ServletContextEvent
the notification event
event
)

Notification that the web application initialization process is starting.

public List<HttpSession>
private ApplicationAssociate
private boolean
private boolean
private boolean
public void
requestDestroyed(ServletRequestEvent
the notification event
event
)

The request is about to go out of scope of the web application.

public void
requestInitialized(ServletRequestEvent
the notification event
event
)

The request is about to come into scope of the web application.

public void
sessionCreated(HttpSessionEvent
the notification event
event
)

Notification that a session has been created.

public void
sessionDestroyed(HttpSessionEvent
the notification event
event
)

Notification that a session is about to be invalidated.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

activeSessionsback to summary
private final Set<HttpSession> activeSessions
applicationAssociateback to summary
private ApplicationAssociate applicationAssociate
servletContextback to summary
private ServletContext servletContext

Constructor Detail

WebappLifecycleListenerback to summary
public WebappLifecycleListener()
WebappLifecycleListenerback to summary
public WebappLifecycleListener(ServletContext servletContext)

Method Detail

contextDestroyedback to summary
public void contextDestroyed(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:ServletContextEvent

the nofication event

contextInitializedback to summary
public void contextInitialized(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:ServletContextEvent

the notification event

getActiveSessionsback to summary
public List<HttpSession> getActiveSessions()
getAssociateback to summary
private ApplicationAssociate getAssociate()
haveProtectedViewsback to summary
private boolean haveProtectedViews(ApplicationAssociate associate)
isDevModeEnabledback to summary
private boolean isDevModeEnabled(ApplicationAssociate associate)
isDistributableback to summary
private boolean isDistributable(ServletRequestEvent event)
requestDestroyedback to summary
public void requestDestroyed(ServletRequestEvent event)

The request is about to go out of scope of the web application.

Parameters
event:ServletRequestEvent

the notification event

requestInitializedback to summary
public void requestInitialized(ServletRequestEvent event)

The request is about to come into scope of the web application.

Parameters
event:ServletRequestEvent

the notification event

sessionCreatedback to summary
public void sessionCreated(HttpSessionEvent event)

Notification that a session has been created.

Parameters
event:HttpSessionEvent

the notification event

sessionDestroyedback to summary
public void sessionDestroyed(HttpSessionEvent event)

Notification that a session is about to be invalidated.

Parameters
event:HttpSessionEvent

the notification event