|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nakedobjects.runtime.context.NakedObjectsContext
org.nakedobjects.runtime.context.NakedObjectsContextMultiUser
org.nakedobjects.runtime.context.NakedObjectsContextThreadLocal
public class NakedObjectsContextThreadLocal
Basic multi-user implementation of NakedObjects that stores a set of components for each thread in use.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.nakedobjects.runtime.context.NakedObjectsContext |
|---|
NakedObjectsContext.ContextReplacePolicy, NakedObjectsContext.SessionClosePolicy |
| Constructor Summary | |
|---|---|
protected |
NakedObjectsContextThreadLocal(NakedObjectSessionFactory sessionFactory)
|
| Method Summary | |
|---|---|
java.lang.String[] |
allSessionIds()
All known session Ids. |
void |
closeAllSessionsInstance()
Shutdown the application. |
protected NakedObjectSession |
createAndOpenSession(java.lang.Thread thread,
AuthenticationSession authenticationSession)
|
static NakedObjectsContext |
createInstance(NakedObjectSessionFactory sessionFactory)
|
void |
debugData(DebugString debug)
|
java.lang.String |
debugTitle()
|
protected void |
doClose()
Overridable hook method called from NakedObjectsContext.closeSessionInstance(), allowing subclasses to clean up
(for example datastructures). |
NakedObjectSession |
getSessionInstance()
Get execution context used by the current thread. |
protected NakedObjectSession |
getSessionInstance(java.lang.String executionContextId)
The NakedObjectSession for specified NakedObjectSession.getId(). |
NakedObjectSession |
openSessionInstance(AuthenticationSession authenticationSession)
Is only intended to be called through NakedObjectsContext.openSession(AuthenticationSession). |
protected void |
shutdownAllThreads()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected NakedObjectsContextThreadLocal(NakedObjectSessionFactory sessionFactory)
| Method Detail |
|---|
public static NakedObjectsContext createInstance(NakedObjectSessionFactory sessionFactory)
public void closeAllSessionsInstance()
NakedObjectsContext
closeAllSessionsInstance in class NakedObjectsContextprotected void shutdownAllThreads()
protected void doClose()
NakedObjectsContextNakedObjectsContext.closeSessionInstance(), allowing subclasses to clean up
(for example datastructures).
The current NakedObjectSession will already have been
closed.
doClose in class NakedObjectsContextpublic java.lang.String[] allSessionIds()
NakedObjectsContextProvided primarily for debugging.
allSessionIds in class NakedObjectsContextpublic java.lang.String debugTitle()
public void debugData(DebugString debug)
debugData in interface DebugInfodebugData in class NakedObjectsContextprotected NakedObjectSession getSessionInstance(java.lang.String executionContextId)
NakedObjectsContextNakedObjectSession for specified NakedObjectSession.getId().
getSessionInstance in class NakedObjectsContextpublic NakedObjectSession openSessionInstance(AuthenticationSession authenticationSession)
NakedObjectsContext.openSession(AuthenticationSession).
Implementation note: an alternative design would have just been to bind onto a thread local.
openSessionInstance in class NakedObjectsContext
protected NakedObjectSession createAndOpenSession(java.lang.Thread thread,
AuthenticationSession authenticationSession)
public NakedObjectSession getSessionInstance()
execution context used by the current thread.
If no set exists then throws an IllegalStateException (must call openSessionInstance(AuthenticationSession) first).
getSessionInstance in class NakedObjectsContextopenSessionInstance(AuthenticationSession)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||