Package org.exoplatform.web
Class GenericHttpListener
java.lang.Object
org.exoplatform.container.web.AbstractHttpSessionListener
org.exoplatform.web.GenericHttpListener
- All Implemented Interfaces:
jakarta.servlet.http.HttpSessionListener,jakarta.servlet.ServletContextListener,EventListener
public class GenericHttpListener
extends org.exoplatform.container.web.AbstractHttpSessionListener
implements jakarta.servlet.ServletContextListener
This class is used to broadcast any "HttpEvent" to allow the rest of the platform to be notified without changing the web.xml
file.
Created by The eXo Platform SAS Author : Nicolas Filotto nicolas.filotto@exoplatform.com 25 sept. 2009
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcontextDestroyed(jakarta.servlet.ServletContextEvent event) This method is called when theServletContextof the Portal is destroyed.voidcontextInitialized(jakarta.servlet.ServletContextEvent event) This method is called when theServletContextof the Portal is initialized.protected voidonSessionCreated(org.exoplatform.container.ExoContainer container, jakarta.servlet.http.HttpSessionEvent event) This method is called when a HTTP session of a Portal instance is created.protected voidonSessionDestroyed(org.exoplatform.container.ExoContainer container, jakarta.servlet.http.HttpSessionEvent event) This method is called when a HTTP session of a Portal instance is destroyed.protected booleanMethods inherited from class org.exoplatform.container.web.AbstractHttpSessionListener
getContainer, sessionCreated, sessionDestroyed
-
Field Details
-
SESSION_CREATED
The name of the "session created" event- See Also:
-
SESSION_DESTROYED
The name of the "session destroyed" event- See Also:
-
CONTEXT_INITIALIZED
The name of the "context initialized" event- See Also:
-
CONTEXT_DESTROYED
The name of the "context destroyed" event- See Also:
-
-
Constructor Details
-
GenericHttpListener
public GenericHttpListener()
-
-
Method Details
-
onSessionCreated
protected void onSessionCreated(org.exoplatform.container.ExoContainer container, jakarta.servlet.http.HttpSessionEvent event) This method is called when a HTTP session of a Portal instance is created. 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 SESSION_CREATED event 4) Flush theThreadLocalfor the PortalContainer- Specified by:
onSessionCreatedin classorg.exoplatform.container.web.AbstractHttpSessionListener
-
onSessionDestroyed
protected void onSessionDestroyed(org.exoplatform.container.ExoContainer container, jakarta.servlet.http.HttpSessionEvent event) This method is called when a HTTP session of a Portal instance 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 SESSION_DESTROYED event 4) Flush theThreadLocalfor the PortalContainer- Specified by:
onSessionDestroyedin classorg.exoplatform.container.web.AbstractHttpSessionListener
-
contextDestroyed
public void contextDestroyed(jakarta.servlet.ServletContextEvent event) This method is called when theServletContextof 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 theThreadLocalfor the PortalContainer- Specified by:
contextDestroyedin interfacejakarta.servlet.ServletContextListener
-
contextInitialized
public void contextInitialized(jakarta.servlet.ServletContextEvent event) This method is called when theServletContextof 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 theThreadLocalfor the PortalContainer- Specified by:
contextInitializedin interfacejakarta.servlet.ServletContextListener
-
requirePortalEnvironment
protected boolean requirePortalEnvironment()- Specified by:
requirePortalEnvironmentin classorg.exoplatform.container.web.AbstractHttpSessionListener- See Also:
-