jodd.servlet
Class SessionMappingListener

java.lang.Object
  extended by jodd.servlet.SessionMappingListener
All Implemented Interfaces:
java.util.EventListener, javax.servlet.http.HttpSessionListener

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

Holds a Map of HttpSessions for sharing between the portlet and servlet. The Map uses weak references to the HttpSession objects to ensure this class does not cause any memory leaks if a session is not removed from the map at the appropriate time.


Constructor Summary
SessionMappingListener()
           
 
Method Summary
static javax.servlet.http.HttpSession getSession(java.lang.String sid)
          Gets the session with the specified ID.
static javax.servlet.http.HttpSession removeSession(java.lang.String sid)
          Removes a session with the specified ID.
 void sessionCreated(javax.servlet.http.HttpSessionEvent event)
           
 void sessionDestroyed(javax.servlet.http.HttpSessionEvent event)
           
static void setSession(javax.servlet.http.HttpSession session)
          Stores a session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionMappingListener

public SessionMappingListener()
Method Detail

getSession

public static javax.servlet.http.HttpSession getSession(java.lang.String sid)
Gets the session with the specified ID.


setSession

public static void setSession(javax.servlet.http.HttpSession session)
Stores a session.


removeSession

public static javax.servlet.http.HttpSession removeSession(java.lang.String sid)
Removes a session with the specified ID.


sessionCreated

public void sessionCreated(javax.servlet.http.HttpSessionEvent event)
Specified by:
sessionCreated in interface javax.servlet.http.HttpSessionListener
See Also:
HttpSessionListener.sessionCreated(javax.servlet.http.HttpSessionEvent)

sessionDestroyed

public void sessionDestroyed(javax.servlet.http.HttpSessionEvent event)
Specified by:
sessionDestroyed in interface javax.servlet.http.HttpSessionListener
See Also:
HttpSessionListener.sessionDestroyed(javax.servlet.http.HttpSessionEvent)


Copyright © 2003-2012 Jodd Team