org.nakedobjects.runtime.context
Class NakedObjectsContextPipe

java.lang.Object
  extended by org.nakedobjects.runtime.context.NakedObjectsContext
      extended by org.nakedobjects.runtime.context.NakedObjectsContextMultiUser
          extended by org.nakedobjects.runtime.context.NakedObjectsContextPipe
All Implemented Interfaces:
DebugInfo

public class NakedObjectsContextPipe
extends NakedObjectsContextMultiUser

A specialised NakedObjectsContext implementation that provides two sets of components: one for the server; and one for the client. This simply determines the current thread and if that thread is the server thread then it provides server data. For any other thread the client data is used.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.nakedobjects.runtime.context.NakedObjectsContext
NakedObjectsContext.ContextReplacePolicy, NakedObjectsContext.SessionClosePolicy
 
Method Summary
 java.lang.String[] allSessionIds()
          All known session Ids.
 void closeAllSessionsInstance()
          Shutdown the application.
static NakedObjectsContext createInstance(NakedObjectSessionFactory sessionFactory)
           
 void debugData(DebugString debug)
           
 java.lang.String debugTitle()
           
 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.
 void setServer(java.lang.Thread server)
           
 
Methods inherited from class org.nakedobjects.runtime.context.NakedObjectsContext
applySessionClosePolicy, closeAllSessions, closeSession, closeSessionInstance, debugSession, debugSystem, doClose, exists, getAuthenticationManager, getAuthenticationSession, getAuthorizationManager, getConfiguration, getCurrentTransaction, getDeploymentType, getInstance, getMessageBroker, getPersistenceSession, getServices, getSession, getSession, getSessionFactory, getSessionFactoryInstance, getSessionId, getSpecificationLoader, getTemplateImageLoader, getTransactionManager, getUpdateNotifier, getUserProfile, getUserProfileLoader, inSession, inTransaction, isContextReplaceable, isSessionAutocloseable, openSession, setConfiguration, testReset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createInstance

public static NakedObjectsContext createInstance(NakedObjectSessionFactory sessionFactory)

setServer

public void setServer(java.lang.Thread server)

getSessionInstance

public NakedObjectSession getSessionInstance()
Description copied from class: NakedObjectsContext
Locates the current NakedObjectSession.

This might just be a singleton (eg NakedObjectsContextStatic), or could be retrieved from the thread (eg NakedObjectsContextThreadLocal).

Specified by:
getSessionInstance in class NakedObjectsContext

openSessionInstance

public NakedObjectSession openSessionInstance(AuthenticationSession authenticationSession)
Description copied from class: NakedObjectsContext
Creates a new NakedObjectSession and binds into the current context.

Specified by:
openSessionInstance in class NakedObjectsContext

closeAllSessionsInstance

public void closeAllSessionsInstance()
Description copied from class: NakedObjectsContext
Shutdown the application.

Specified by:
closeAllSessionsInstance in class NakedObjectsContext

allSessionIds

public java.lang.String[] allSessionIds()
Description copied from class: NakedObjectsContext
All known session Ids.

Provided primarily for debugging.

Specified by:
allSessionIds in class NakedObjectsContext

debugTitle

public java.lang.String debugTitle()

debugData

public void debugData(DebugString debug)
Specified by:
debugData in interface DebugInfo
Overrides:
debugData in class NakedObjectsContext

getSessionInstance

protected NakedObjectSession getSessionInstance(java.lang.String executionContextId)
Description copied from class: NakedObjectsContext
The NakedObjectSession for specified NakedObjectSession.getId().

Specified by:
getSessionInstance in class NakedObjectsContext


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.