org.openmobileis.common.context
Class SessionContextManager

java.lang.Object
  extended byorg.openmobileis.common.context.SessionContextManager
All Implemented Interfaces:
SessionContextService

public class SessionContextManager
extends java.lang.Object
implements SessionContextService


Constructor Summary
SessionContextManager(boolean init)
           
 
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(boolean init)
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

Specified by:
getSessionContext in interface SessionContextService

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.

Specified by:
getSessionContext in interface SessionContextService

createSessionContext

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

Specified by:
createSessionContext in interface SessionContextService

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.

Specified by:
joinSessionContext in interface SessionContextService

invalidateSession

public void invalidateSession(java.lang.String id)
Specified by:
invalidateSession in interface SessionContextService

leaveSessionContext

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

Specified by:
leaveSessionContext in interface SessionContextService


Copyright 2006 OpenMobileIS. All Rights Reserved.