com.evermind.server.http
Interface HttpSessionManager


public interface HttpSessionManager

The HttpSessionManager interface allows custom implementations of session management, for instance a distributed implementation over a special type of protocol.


Method Summary
 javax.servlet.http.HttpSession createSession()
          Requests a "fresh" session from the manager, this method is called when a new session needs to be created for a client.
 void destroy()
          This method is called when the manager is to be deactivated, for instance at server shutdown, it gives the manager a chance to deallocate it's resources.
 javax.servlet.http.HttpSession getSession(java.lang.String id)
          Requests an existins session from the manager, if a valid session with a matching id can't be found this method is to return null.
 void init(javax.servlet.ServletConfig config)
          Initializes the manager and gives it a change to allocate whatever resources it may need and configure itself based on the configuration properties.
 boolean isValid(javax.servlet.http.HttpSession session)
          Whether or not a session is still valid, usually two things invalidates sessions: 1.
 

Method Detail

init


public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Initializes the manager and gives it a change to allocate whatever resources it may need and configure itself based on the configuration properties.
Parameters:
config - The config this manager recieves

isValid


public boolean isValid(javax.servlet.http.HttpSession session)
Whether or not a session is still valid, usually two things invalidates sessions: 1. The "idle-time" has passed, the session is no longer usable. 2. HttpSession.invalidate() has been called on the session rendering it invalid.

getSession


public javax.servlet.http.HttpSession getSession(java.lang.String id)
Requests an existins session from the manager, if a valid session with a matching id can't be found this method is to return null.

createSession


public javax.servlet.http.HttpSession createSession()
Requests a "fresh" session from the manager, this method is called when a new session needs to be created for a client.

destroy


public void destroy()
This method is called when the manager is to be deactivated, for instance at server shutdown, it gives the manager a chance to deallocate it's resources.