public class SessionListener extends Object implements HttpSessionListener, HttpSessionActivationListener, Serializable
web.xml
deployment
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.
The sessionCreated(HttpSessionEvent)
callback will
automatically add an instance of this listener to any newly created
HttpSession
for detection of session passivation and
re-activation.HttpSessionListener
,
Serialized FormConstructor and Description |
---|
SessionListener() |
Modifier and Type | Method and Description |
---|---|
void |
sessionCreated(HttpSessionEvent event)
Called by the servlet container when a new session is created
|
void |
sessionDestroyed(HttpSessionEvent event)
Called by the servlet container when a session is destroyed
|
void |
sessionDidActivate(HttpSessionEvent event)
Called by the servlet container when an existing session is
(re-)activated.
|
void |
sessionWillPassivate(HttpSessionEvent event)
Called by the servlet container when a an existing session is
passivated.
|
public SessionListener()
public void sessionCreated(HttpSessionEvent event)
sessionCreated
in interface HttpSessionListener
event
- Session creation event.public void sessionDestroyed(HttpSessionEvent event)
sessionDestroyed
in interface HttpSessionListener
event
- Session destruction event.public void sessionDidActivate(HttpSessionEvent event)
sessionDidActivate
in interface HttpSessionActivationListener
event
- Session activation event.public void sessionWillPassivate(HttpSessionEvent event)
sessionWillPassivate
in interface HttpSessionActivationListener
event
- Session passivation event.Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.