com.ideo.sweetdevria.page
Class SessionRegistry

java.lang.Object
  extended by com.ideo.sweetdevria.page.SessionRegistry

public class SessionRegistry
extends java.lang.Object

Registry storing every user session an associating them a PageRegistry.

Author:
Julien Maupoux

Method Summary
 void destroySession(javax.servlet.http.HttpSession session)
          Remove a session from the session registry If multiple session are connected to a single page registry, all the sessions will have to be removed before the registry to be deleted.
 void forceDestroySession(javax.servlet.http.HttpSession session)
          Force the session deletion from the session registry If multiple session are connected to a single page registry (multi user login), all the sessions will be deleted from the registry
static SessionRegistry getInstance()
           
 PageRegistry getPageRegistry(javax.servlet.http.HttpSession session)
          Return a PageRegistry according to the session.
 boolean isSessionRegistered(javax.servlet.http.HttpSession session)
          Test if a session is already registered, or if it is the first time an access is processed.
 void registerPage(javax.servlet.http.HttpSession session, Page page)
          Register a page for this session
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getInstance

public static SessionRegistry getInstance()

isSessionRegistered

public boolean isSessionRegistered(javax.servlet.http.HttpSession session)
Test if a session is already registered, or if it is the first time an access is processed.

Parameters:
session - the session to test
Returns:
true if a register already exist for this session

getPageRegistry

public PageRegistry getPageRegistry(javax.servlet.http.HttpSession session)
Return a PageRegistry according to the session. Create if none already exist

Returns:
a PageRegistry for this session

registerPage

public void registerPage(javax.servlet.http.HttpSession session,
                         Page page)
Register a page for this session

Parameters:
session - the session of the user
page - the page to register

destroySession

public void destroySession(javax.servlet.http.HttpSession session)
Remove a session from the session registry If multiple session are connected to a single page registry, all the sessions will have to be removed before the registry to be deleted.

Parameters:
session - the session to remove.

forceDestroySession

public void forceDestroySession(javax.servlet.http.HttpSession session)
Force the session deletion from the session registry If multiple session are connected to a single page registry (multi user login), all the sessions will be deleted from the registry

Parameters:
session - the session to remove.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2010 Ideo Technologies. All Rights Reserved.