Class ContextManagerListener
java.lang.Object
org.exoplatform.container.web.AbstractHttpSessionListener
org.exoplatform.container.context.ContextManagerListener
- All Implemented Interfaces:
EventListener,javax.servlet.http.HttpSessionListener,javax.servlet.ServletRequestListener
public class ContextManagerListener
extends AbstractHttpSessionListener
implements javax.servlet.ServletRequestListener
This listener is used to manage the components of scope
SessionScoped and RequestScoped- Version:
- $Id$
- Author:
- Nicolas Filotto
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final ExoContainergetContainer(javax.servlet.ServletRequestEvent event) protected voidonRequestDestroyed(ExoContainer container, javax.servlet.ServletRequestEvent event) Called when a request is destroyedprotected voidonRequestInitialized(ExoContainer container, javax.servlet.ServletRequestEvent event) Called when a request is createdprotected voidonSessionCreated(ExoContainer container, javax.servlet.http.HttpSessionEvent event) Allow sub-classes to execute an action when a session is createdprotected voidonSessionDestroyed(ExoContainer container, javax.servlet.http.HttpSessionEvent event) Allow sub-classes to execute an action when a session is destroyedstatic voidregisterIfNeeded(ExoContainer container, javax.servlet.ServletContext context) Registers dynamically the listener if aContextManagerhas been defined and a context for SessionScoped and/or RequestScoped has been configured.voidrequestDestroyed(javax.servlet.ServletRequestEvent event) voidrequestInitialized(javax.servlet.ServletRequestEvent event) protected booleanIndicates if it requires that a full portal environment must be setMethods inherited from class org.exoplatform.container.web.AbstractHttpSessionListener
getContainer, sessionCreated, sessionDestroyed
-
Constructor Details
-
ContextManagerListener
public ContextManagerListener()
-
-
Method Details
-
requestDestroyed
public void requestDestroyed(javax.servlet.ServletRequestEvent event) - Specified by:
requestDestroyedin interfacejavax.servlet.ServletRequestListener
-
requestInitialized
public void requestInitialized(javax.servlet.ServletRequestEvent event) - Specified by:
requestInitializedin interfacejavax.servlet.ServletRequestListener
-
requirePortalEnvironment
protected boolean requirePortalEnvironment()Indicates if it requires that a full portal environment must be set- Specified by:
requirePortalEnvironmentin classAbstractHttpSessionListener- Returns:
trueif it requires the portal environmentfalseotherwise.
-
onRequestInitialized
protected void onRequestInitialized(ExoContainer container, javax.servlet.ServletRequestEvent event) Called when a request is created -
onRequestDestroyed
Called when a request is destroyed -
onSessionCreated
Allow sub-classes to execute an action when a session is created- Specified by:
onSessionCreatedin classAbstractHttpSessionListener- Parameters:
container- the eXo containerevent- theHttpSessionEvent
-
onSessionDestroyed
protected void onSessionDestroyed(ExoContainer container, javax.servlet.http.HttpSessionEvent event) Allow sub-classes to execute an action when a session is destroyed- Specified by:
onSessionDestroyedin classAbstractHttpSessionListener- Parameters:
container- the eXo containerevent- theHttpSessionEvent
-
getContainer
- Returns:
- Gives the
ExoContainerthat fits best with the current context
-
registerIfNeeded
Registers dynamically the listener if aContextManagerhas been defined and a context for SessionScoped and/or RequestScoped has been configured.- Parameters:
container- the container from which we will get theContextManagercontext- the context to which we want to add the listener
-