javawebparts.listener
Class SessionLimiterListener

java.lang.Object
  |
  +--javawebparts.listener.SessionLimiterListener
All Implemented Interfaces:
java.util.EventListener, javax.servlet.http.HttpSessionListener

public class SessionLimiterListener
extends java.lang.Object
implements javax.servlet.http.HttpSessionListener

This HttpSessionListener has to be registered in order to use the session limiting facility (see javawebparts.filter.SessionLimiterFilter).

The listener is essential because when session are invalidated (by the application code or they expire) we have to unregister them from our registration of allowed sessions.

Example configuration in web.xml:

<listener>
  <listener-class> javawebparts.listener.SessionLimiterListener</listener-class>
</listener>

Author:
Tamas Szabo

Field Summary
private static org.apache.commons.logging.Log log
          Log instance.
 
Constructor Summary
SessionLimiterListener()
           
 
Method Summary
 void sessionCreated(javax.servlet.http.HttpSessionEvent sevent)
          Unregistering the session when it is destroyed.
 void sessionDestroyed(javax.servlet.http.HttpSessionEvent sevent)
          Unregistering the session when it is destroyed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static org.apache.commons.logging.Log log
Log instance.

Constructor Detail

SessionLimiterListener

public SessionLimiterListener()
Method Detail

sessionCreated

public void sessionCreated(javax.servlet.http.HttpSessionEvent sevent)
Unregistering the session when it is destroyed.

Specified by:
sessionCreated in interface javax.servlet.http.HttpSessionListener
Parameters:
sevent - HttpSessionEvent.

sessionDestroyed

public void sessionDestroyed(javax.servlet.http.HttpSessionEvent sevent)
Unregistering the session when it is destroyed.

Specified by:
sessionDestroyed in interface javax.servlet.http.HttpSessionListener
Parameters:
sevent - HttpSessionEvent.


Copyright © 2005 Frank W. Zammetti