|
||||||||||
| 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.NakedObjectsContextStatic
public class NakedObjectsContextStatic
Provides access to the current NakedObjectSession in a single-user deployment (and thus implemented as a static singleton).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.nakedobjects.runtime.context.NakedObjectsContext |
|---|
NakedObjectsContext.ContextReplacePolicy, NakedObjectsContext.SessionClosePolicy |
| Constructor Summary | |
|---|---|
protected |
NakedObjectsContextStatic(NakedObjectsContext.ContextReplacePolicy replacePolicy,
NakedObjectsContext.SessionClosePolicy sessionClosePolicy,
NakedObjectSessionFactory sessionFactory)
|
| Method Summary | |
|---|---|
java.lang.String[] |
allSessionIds()
All known session Ids. |
void |
closeAllSessionsInstance()
Shutdown the application. |
static NakedObjectsContext |
createInstance(NakedObjectSessionFactory sessionFactory)
|
static NakedObjectsContext |
createRelaxedInstance(NakedObjectSessionFactory sessionFactory)
Intended for testing; the singleton can be replaced and sessions are autoclosed. |
void |
debug(DebugString debug)
|
void |
debugAll(DebugString debug)
|
java.lang.String |
debugTitle()
|
void |
doClose()
Overridable hook method called from NakedObjectsContext.closeSessionInstance(), allowing subclasses to clean up
(for example datastructures). |
NakedObjectSession |
getSessionInstance()
Locates the current NakedObjectSession. |
protected NakedObjectSession |
getSessionInstance(java.lang.String executionContextId)
The NakedObjectSession for specified NakedObjectSession.getId(). |
NakedObjectSession |
openSessionInstance(AuthenticationSession authenticationSession)
Creates a new NakedObjectSession and binds into the current context. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected NakedObjectsContextStatic(NakedObjectsContext.ContextReplacePolicy replacePolicy,
NakedObjectsContext.SessionClosePolicy sessionClosePolicy,
NakedObjectSessionFactory sessionFactory)
| Method Detail |
|---|
public static NakedObjectsContext createInstance(NakedObjectSessionFactory sessionFactory)
public static NakedObjectsContext createRelaxedInstance(NakedObjectSessionFactory sessionFactory)
public NakedObjectSession getSessionInstance()
NakedObjectsContextNakedObjectSession.
This might just be a singleton (eg NakedObjectsContextStatic), or could be retrieved from the
thread (eg NakedObjectsContextThreadLocal).
getSessionInstance in class NakedObjectsContextpublic NakedObjectSession openSessionInstance(AuthenticationSession authenticationSession)
NakedObjectsContextNakedObjectSession and binds into the current context.
openSessionInstance in class NakedObjectsContextpublic 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 void closeAllSessionsInstance()
NakedObjectsContext
closeAllSessionsInstance in class NakedObjectsContextpublic java.lang.String debugTitle()
public void debug(DebugString debug)
public void debugAll(DebugString debug)
protected NakedObjectSession getSessionInstance(java.lang.String executionContextId)
NakedObjectsContextNakedObjectSession for specified NakedObjectSession.getId().
getSessionInstance in class NakedObjectsContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||