org.sapia.regis
Class SessionUtil

java.lang.Object
  extended by org.sapia.regis.SessionUtil

public class SessionUtil
extends Object


Constructor Summary
SessionUtil()
           
 
Method Summary
static void close()
          This method closes the session with which the current thread is associated and unjoins the current thread.
static RegisSession createSessionFor(Object obj)
           
static RegisSession current()
           
static boolean isJoined()
           
static void join(RegisSession session)
          This method "joins" the current thread to the given session .
static void unjoin()
          This method "unjoins" the current thread from the given session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionUtil

public SessionUtil()
Method Detail

createSessionFor

public static RegisSession createSessionFor(Object obj)
Parameters:
obj - an Object implementing the RegistryProvider interface.
Returns:
the RegisSession that was internally created and associated with the current thread.

current

public static RegisSession current()
Returns:
the RegisSession that is registered witht the current thread.

join

public static void join(RegisSession session)
This method "joins" the current thread to the given session .

Parameters:
session - a RegisSession to associate with the current thread. If the current thread is already associated session, no exception is thrown and the given session becomes the associated session.

unjoin

public static void unjoin()
This method "unjoins" the current thread from the given session.


close

public static void close()
This method closes the session with which the current thread is associated and unjoins the current thread.

See Also:
unjoin()

isJoined

public static boolean isJoined()
Returns:
true if the current thread is joined with a session.
See Also:
join(RegisSession)


Copyright © 2006 Sapia Open Community, Inc. All Rights Reserved.