Package org.appng.core.controller
Class SessionListener
- java.lang.Object
-
- org.appng.core.controller.SessionListener
-
- All Implemented Interfaces:
EventListener
,javax.servlet.http.HttpSessionListener
,javax.servlet.ServletContextListener
,javax.servlet.ServletRequestListener
@WebListener public class SessionListener extends Object implements javax.servlet.ServletContextListener, javax.servlet.http.HttpSessionListener, javax.servlet.ServletRequestListener
A (ServletContext/HttpSession/ServletRequest) listener that keeps track of creation/destruction and usage ofHttpSession
s by putting aSession
object, which is updated on each request, into theHttpSession
- Author:
- Matthias Herlitzius, Matthias Müller
-
-
Field Summary
Fields Modifier and Type Field Description static String
META_DATA
static String
SESSION_MANAGER
-
Constructor Summary
Constructors Constructor Description SessionListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
contextDestroyed(javax.servlet.ServletContextEvent sce)
void
contextInitialized(javax.servlet.ServletContextEvent sce)
void
requestDestroyed(javax.servlet.ServletRequestEvent sre)
void
requestInitialized(javax.servlet.ServletRequestEvent sre)
void
sessionCreated(javax.servlet.http.HttpSessionEvent event)
void
sessionDestroyed(javax.servlet.http.HttpSessionEvent event)
protected void
setDiagnosticContext(Environment env, javax.servlet.http.HttpServletRequest httpServletRequest, Site site)
protected void
setSecureFlag(javax.servlet.http.HttpServletRequest httpServletRequest, Site site)
-
-
-
Field Detail
-
SESSION_MANAGER
public static final String SESSION_MANAGER
- See Also:
- Constant Field Values
-
META_DATA
public static final String META_DATA
- See Also:
- Constant Field Values
-
-
Method Detail
-
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent sce)
- Specified by:
contextInitialized
in interfacejavax.servlet.ServletContextListener
-
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent sce)
- Specified by:
contextDestroyed
in interfacejavax.servlet.ServletContextListener
-
sessionCreated
public void sessionCreated(javax.servlet.http.HttpSessionEvent event)
- Specified by:
sessionCreated
in interfacejavax.servlet.http.HttpSessionListener
-
sessionDestroyed
public void sessionDestroyed(javax.servlet.http.HttpSessionEvent event)
- Specified by:
sessionDestroyed
in interfacejavax.servlet.http.HttpSessionListener
-
requestInitialized
public void requestInitialized(javax.servlet.ServletRequestEvent sre)
- Specified by:
requestInitialized
in interfacejavax.servlet.ServletRequestListener
-
setDiagnosticContext
protected void setDiagnosticContext(Environment env, javax.servlet.http.HttpServletRequest httpServletRequest, Site site)
-
setSecureFlag
protected void setSecureFlag(javax.servlet.http.HttpServletRequest httpServletRequest, Site site)
-
requestDestroyed
public void requestDestroyed(javax.servlet.ServletRequestEvent sre)
- Specified by:
requestDestroyed
in interfacejavax.servlet.ServletRequestListener
-
-