org.openmobileis.common.context
Class SessionContextManager

java.lang.Object
  extended byorg.openmobileis.common.context.SessionContextManager

public class SessionContextManager
extends java.lang.Object


Constructor Summary
SessionContextManager()
           
 
Method Summary
 SessionContext createSessionContext(java.lang.String id)
          create a new session context with the specified Id.
static SessionContextManager getManager()
           
 SessionContext getSessionContext()
          return the session context associéted with the currentThread.
 SessionContext getSessionContext(java.lang.String id)
          return the session context with the specified id. return null if not found
 void invalidateSession(java.lang.String id)
           
 void joinSessionContext(java.lang.String id)
          Join the current thread to the SessionContext with the specified id.
 void leaveSessionContext()
          After a thread has use a session context.
protected  SessionContext realCreateSessionContext(java.lang.String id)
           
static void registerManager(SessionContextManager newManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionContextManager

public SessionContextManager()
Method Detail

registerManager

public static final void registerManager(SessionContextManager newManager)

getManager

public static final SessionContextManager getManager()

getSessionContext

public SessionContext getSessionContext(java.lang.String id)
return the session context with the specified id. return null if not found


getSessionContext

public SessionContext getSessionContext()
return the session context associéted with the currentThread. Null if not session is associated with the current thread. The method joinSessionContext must have been call before.


createSessionContext

public SessionContext createSessionContext(java.lang.String id)
create a new session context with the specified Id.


realCreateSessionContext

protected SessionContext realCreateSessionContext(java.lang.String id)

joinSessionContext

public void joinSessionContext(java.lang.String id)
Join the current thread to the SessionContext with the specified id. If no SessionContext has the id create it. A thread can only join one SessionContext.


invalidateSession

public void invalidateSession(java.lang.String id)

leaveSessionContext

public void leaveSessionContext()
After a thread has use a session context. Before ending it must leave the session context.



Copyright 2006 OpenMobileIS. All Rights Reserved.