Class SessionListener
- java.lang.Object
-
- org.apache.turbine.services.session.SessionListener
-
- All Implemented Interfaces:
Serializable,EventListener,HttpSessionActivationListener,HttpSessionListener
public class SessionListener extends Object implements HttpSessionListener, HttpSessionActivationListener, Serializable
This class is a listener for both session creation and destruction, and for session activation and passivation. It must be configured via your web application'sweb.xmldeployment descriptor as follows for the container to call it:<listener> <listener-class> org.apache.turbine.session.SessionListener </listener-class> </listener><listener>elements can occur between<context-param>and<servlet>elements in your deployment descriptor. ThesessionCreated(HttpSessionEvent)callback will automatically add an instance of this listener to any newly createdHttpSessionfor detection of session passivation and re-activation.- Since:
- 2.3
- Version:
- $Id$
- Author:
- Quinton McCombs, Daniel Rall
- See Also:
HttpSessionListener, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SessionListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsessionCreated(HttpSessionEvent event)Called by the servlet container when a new session is createdvoidsessionDestroyed(HttpSessionEvent event)Called by the servlet container when a session is destroyedvoidsessionDidActivate(HttpSessionEvent event)Called by the servlet container when an existing session is (re-)activated.voidsessionWillPassivate(HttpSessionEvent event)Called by the servlet container when a an existing session is passivated.
-
-
-
Constructor Detail
-
SessionListener
public SessionListener()
-
-
Method Detail
-
sessionCreated
public void sessionCreated(HttpSessionEvent event)
Called by the servlet container when a new session is created- Specified by:
sessionCreatedin interfaceHttpSessionListener- Parameters:
event- Session creation event.
-
sessionDestroyed
public void sessionDestroyed(HttpSessionEvent event)
Called by the servlet container when a session is destroyed- Specified by:
sessionDestroyedin interfaceHttpSessionListener- Parameters:
event- Session destruction event.
-
sessionDidActivate
public void sessionDidActivate(HttpSessionEvent event)
Called by the servlet container when an existing session is (re-)activated.- Specified by:
sessionDidActivatein interfaceHttpSessionActivationListener- Parameters:
event- Session activation event.
-
sessionWillPassivate
public void sessionWillPassivate(HttpSessionEvent event)
Called by the servlet container when a an existing session is passivated.- Specified by:
sessionWillPassivatein interfaceHttpSessionActivationListener- Parameters:
event- Session passivation event.
-
-