Tuscany Core

org.apache.tuscany.core.context.impl
Class CompositeContextImpl

java.lang.Object
  extended by org.apache.tuscany.core.context.impl.AbstractLifecycle
      extended by org.apache.tuscany.core.context.impl.AbstractContext
          extended by org.apache.tuscany.core.context.impl.AbstractCompositeContext
              extended by org.apache.tuscany.core.context.impl.CompositeContextImpl
All Implemented Interfaces:
ContextFactoryBuilder, WireBuilder, AutowireContext, CompositeContext, ConfigurationContext, Context, EventPublisher, Lifecycle, ScopeAwareContext, org.osoa.sca.ModuleContext

public class CompositeContextImpl
extends AbstractCompositeContext
implements org.osoa.sca.ModuleContext

The standard implementation of an composite context. Autowiring is performed by delegating to the parent context.

Version:
$Rev: 405276 $ $Date: 2006-05-08 22:23:05 -0400 (Mon, 08 May 2006) $

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.tuscany.core.context.impl.AbstractCompositeContext
AbstractCompositeContext.NameToScope
 
Field Summary
 
Fields inherited from class org.apache.tuscany.core.context.impl.AbstractCompositeContext
assemblyContext, configurationContext, configurations, DEFAULT_WAIT, eventContext, immutableScopeContexts, initialized, initializeLatch, lock, module, parentContext, scopeContexts, scopeIndex, scopeStrategy
 
Fields inherited from class org.apache.tuscany.core.context.impl.AbstractLifecycle
lifecycleState, name
 
Fields inherited from interface org.apache.tuscany.core.context.Lifecycle
CONFIG_ERROR, ERROR, INITIALIZED, INITIALIZING, RUNNING, STARTED, STOPPED, STOPPING, UNINITIALIZED
 
Fields inherited from interface org.apache.tuscany.core.context.Lifecycle
CONFIG_ERROR, ERROR, INITIALIZED, INITIALIZING, RUNNING, STARTED, STOPPED, STOPPING, UNINITIALIZED
 
Constructor Summary
CompositeContextImpl()
           
CompositeContextImpl(java.lang.String name, CompositeContext parent, AutowireContext autowireContext, ScopeStrategy strategy, EventContext ctx, ConfigurationContext configCtx)
           
CompositeContextImpl(java.lang.String name, CompositeContext parent, ScopeStrategy strategy, EventContext ctx, ConfigurationContext configCtx)
           
 
Method Summary
 org.osoa.sca.ServiceReference createServiceReference(java.lang.String serviceName)
           
 org.osoa.sca.ServiceReference createServiceReferenceForSession(java.lang.Object self)
           
 org.osoa.sca.ServiceReference createServiceReferenceForSession(java.lang.Object self, java.lang.String serviceName)
           
 org.osoa.sca.RequestContext getRequestContext()
           
 java.lang.Object locateService(java.lang.String qualifiedName)
           
 org.osoa.sca.ServiceReference newSession(java.lang.String serviceName)
           
 org.osoa.sca.ServiceReference newSession(java.lang.String serviceName, java.lang.Object sessionId)
           
 void setScopeStrategy(ScopeStrategy scopeStrategy)
           
 
Methods inherited from class org.apache.tuscany.core.context.impl.AbstractCompositeContext
build, buildTarget, checkInit, completeTargetChain, connect, fireEvent, getComposite, getContext, getInstance, getParent, getScopeContexts, getURI, initializeScopes, initializeWireFactories, publish, registerAutowireExternal, registerAutowireInternal, registerConfiguration, registerModelObject, registerModelObjects, removeContext, resolveExternalInstance, resolveInstance, setAssemblyContext, setAutowireContext, setConfigurationContext, setEventContext, setModule, setParent, setURI, start, stop, wireSource
 
Methods inherited from class org.apache.tuscany.core.context.impl.AbstractLifecycle
addListener, addListener, getLifecycleState, getListeners, getName, removeListener, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.osoa.sca.ModuleContext
getName, getURI
 
Methods inherited from interface org.apache.tuscany.core.context.EventPublisher
addListener, addListener, removeListener
 
Methods inherited from interface org.apache.tuscany.core.context.Lifecycle
getLifecycleState, getName, setName
 
Methods inherited from interface org.apache.tuscany.core.context.EventPublisher
addListener, addListener, removeListener
 
Methods inherited from interface org.apache.tuscany.core.context.Lifecycle
getLifecycleState, getName, setName
 

Constructor Detail

CompositeContextImpl

public CompositeContextImpl()

CompositeContextImpl

public CompositeContextImpl(java.lang.String name,
                            CompositeContext parent,
                            ScopeStrategy strategy,
                            EventContext ctx,
                            ConfigurationContext configCtx)

CompositeContextImpl

public CompositeContextImpl(java.lang.String name,
                            CompositeContext parent,
                            AutowireContext autowireContext,
                            ScopeStrategy strategy,
                            EventContext ctx,
                            ConfigurationContext configCtx)
Method Detail

setScopeStrategy

public void setScopeStrategy(ScopeStrategy scopeStrategy)

locateService

public java.lang.Object locateService(java.lang.String qualifiedName)
                               throws org.osoa.sca.ServiceUnavailableException
Specified by:
locateService in interface org.osoa.sca.ModuleContext
Throws:
org.osoa.sca.ServiceUnavailableException

createServiceReference

public org.osoa.sca.ServiceReference createServiceReference(java.lang.String serviceName)

getRequestContext

public org.osoa.sca.RequestContext getRequestContext()
Specified by:
getRequestContext in interface org.osoa.sca.ModuleContext

createServiceReferenceForSession

public org.osoa.sca.ServiceReference createServiceReferenceForSession(java.lang.Object self)
Specified by:
createServiceReferenceForSession in interface org.osoa.sca.ModuleContext

createServiceReferenceForSession

public org.osoa.sca.ServiceReference createServiceReferenceForSession(java.lang.Object self,
                                                                      java.lang.String serviceName)
Specified by:
createServiceReferenceForSession in interface org.osoa.sca.ModuleContext

newSession

public org.osoa.sca.ServiceReference newSession(java.lang.String serviceName)
Specified by:
newSession in interface org.osoa.sca.ModuleContext

newSession

public org.osoa.sca.ServiceReference newSession(java.lang.String serviceName,
                                                java.lang.Object sessionId)
Specified by:
newSession in interface org.osoa.sca.ModuleContext

Tuscany Core

-