public class GenericHttpListener
extends org.exoplatform.container.web.AbstractHttpSessionListener
implements javax.servlet.ServletContextListener
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTEXT_DESTROYED
The name of the "context destroyed" event
|
static String |
CONTEXT_INITIALIZED
The name of the "context initialized" event
|
static String |
SESSION_CREATED
The name of the "session created" event
|
static String |
SESSION_DESTROYED
The name of the "session destroyed" event
|
| Constructor and Description |
|---|
GenericHttpListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
contextDestroyed(javax.servlet.ServletContextEvent event)
This method is called when the
ServletContext of the Portal is destroyed. |
void |
contextInitialized(javax.servlet.ServletContextEvent event)
This method is called when the
ServletContext of the Portal is initialized. |
protected void |
onSessionCreated(org.exoplatform.container.ExoContainer container,
javax.servlet.http.HttpSessionEvent event)
This method is called when a HTTP session of a Portal instance is created.
|
protected void |
onSessionDestroyed(org.exoplatform.container.ExoContainer container,
javax.servlet.http.HttpSessionEvent event)
This method is called when a HTTP session of a Portal instance is destroyed.
|
protected boolean |
requirePortalEnvironment() |
public static final String SESSION_CREATED
public static final String SESSION_DESTROYED
public static final String CONTEXT_INITIALIZED
public static final String CONTEXT_DESTROYED
protected void onSessionCreated(org.exoplatform.container.ExoContainer container,
javax.servlet.http.HttpSessionEvent event)
ThreadLocal for the PortalContaineronSessionCreated in class org.exoplatform.container.web.AbstractHttpSessionListenerprotected void onSessionDestroyed(org.exoplatform.container.ExoContainer container,
javax.servlet.http.HttpSessionEvent event)
ThreadLocal for the PortalContaineronSessionDestroyed in class org.exoplatform.container.web.AbstractHttpSessionListenerpublic void contextDestroyed(javax.servlet.ServletContextEvent event)
ServletContext of the Portal is destroyed.
In this method, we: 1) first get the portal instance name for which the session is created. 2) Put the portal instance in
the Portal ThreadLocal 3) Broadcast the CONTEXT_DESTROYED event 4) Flush the ThreadLocal for the PortalContainercontextDestroyed in interface javax.servlet.ServletContextListenerpublic void contextInitialized(javax.servlet.ServletContextEvent event)
ServletContext of the Portal is initialized.
In this method, we: 1) first get the portal instance name for which the session is created. 2) Put the portal instance in
the Portal ThreadLocal 3) Broadcast the CONTEXT_INITIALIZED event 4) Flush the ThreadLocal for the
PortalContainercontextInitialized in interface javax.servlet.ServletContextListenerprotected boolean requirePortalEnvironment()
requirePortalEnvironment in class org.exoplatform.container.web.AbstractHttpSessionListenerAbstractHttpSessionListener.requirePortalEnvironment()Copyright © 2017 JBoss by Red Hat. All Rights Reserved.