public class ContextManagerListener extends AbstractHttpSessionListener implements javax.servlet.ServletRequestListener
SessionScoped and RequestScoped| Constructor and Description |
|---|
ContextManagerListener() |
| Modifier and Type | Method and Description |
|---|---|
protected ExoContainer |
getContainer(javax.servlet.ServletRequestEvent event) |
protected void |
onRequestDestroyed(ExoContainer container,
javax.servlet.ServletRequestEvent event)
Called when a request is destroyed
|
protected void |
onRequestInitialized(ExoContainer container,
javax.servlet.ServletRequestEvent event)
Called when a request is created
|
protected void |
onSessionCreated(ExoContainer container,
javax.servlet.http.HttpSessionEvent event)
Allow sub-classes to execute an action when a session is created
|
protected void |
onSessionDestroyed(ExoContainer container,
javax.servlet.http.HttpSessionEvent event)
Allow sub-classes to execute an action when a session is destroyed
|
static void |
registerIfNeeded(ExoContainer container,
javax.servlet.ServletContext context)
Registers dynamically the listener if a
ContextManager has been defined and
a context for SessionScoped and/or RequestScoped has been configured. |
void |
requestDestroyed(javax.servlet.ServletRequestEvent event) |
void |
requestInitialized(javax.servlet.ServletRequestEvent event) |
protected boolean |
requirePortalEnvironment()
Indicates if it requires that a full portal environment must be set
|
getContainer, sessionCreated, sessionDestroyedpublic void requestDestroyed(javax.servlet.ServletRequestEvent event)
requestDestroyed in interface javax.servlet.ServletRequestListenerpublic void requestInitialized(javax.servlet.ServletRequestEvent event)
requestInitialized in interface javax.servlet.ServletRequestListenerprotected boolean requirePortalEnvironment()
requirePortalEnvironment in class AbstractHttpSessionListenertrue if it requires the portal environment false otherwise.protected void onRequestInitialized(ExoContainer container, javax.servlet.ServletRequestEvent event)
protected void onRequestDestroyed(ExoContainer container, javax.servlet.ServletRequestEvent event)
protected void onSessionCreated(ExoContainer container, javax.servlet.http.HttpSessionEvent event)
onSessionCreated in class AbstractHttpSessionListenercontainer - the eXo containerevent - the HttpSessionEventprotected void onSessionDestroyed(ExoContainer container, javax.servlet.http.HttpSessionEvent event)
onSessionDestroyed in class AbstractHttpSessionListenercontainer - the eXo containerevent - the HttpSessionEventprotected final ExoContainer getContainer(javax.servlet.ServletRequestEvent event)
ExoContainer that fits best with the current contextpublic static void registerIfNeeded(ExoContainer container, javax.servlet.ServletContext context)
ContextManager has been defined and
a context for SessionScoped and/or RequestScoped has been configured.container - the container from which we will get the ContextManagercontext - the context to which we want to add the listenerCopyright © 2017 eXo Platform SAS. All Rights Reserved.