Tuscany Core

org.apache.tuscany.core.context
Interface CompositeContext

All Superinterfaces:
Context, EventPublisher, Lifecycle
All Known Subinterfaces:
AutowireContext, RuntimeContext, ScopeAwareContext, SystemCompositeContext
All Known Implementing Classes:
AbstractCompositeContext, CompositeContextImpl, RuntimeContextImpl, SystemCompositeContextImpl

public interface CompositeContext
extends Context

A context which contains child component contexts.

Version:
$Rev: 406532 $ $Date: 2006-05-15 00:23:43 -0400 (Mon, 15 May 2006) $

Field Summary
 
Fields inherited from interface org.apache.tuscany.core.context.Lifecycle
CONFIG_ERROR, ERROR, INITIALIZED, INITIALIZING, RUNNING, STARTED, STOPPED, STOPPING, UNINITIALIZED
 
Method Summary
 org.apache.tuscany.model.assembly.Composite getComposite()
          Deprecated. 
 Context getContext(java.lang.String name)
          Returns the child context associated with a given name
 CompositeContext getParent()
          Returns the parent context, or null if the context does not have one
 java.lang.String getURI()
           
 void registerModelObject(org.apache.tuscany.model.assembly.Extensible model)
          Adds a runtime artifact represented by the model object to the composite context by merging it with existing artifacts.
 void registerModelObjects(java.util.List<? extends org.apache.tuscany.model.assembly.Extensible> models)
          Adds runtime artifacts represented by the set of model objects to the composite context by merging them with existing artifacts.
 void removeContext(java.lang.String name)
           
 void setAssemblyContext(org.apache.tuscany.model.assembly.AssemblyContext context)
          Deprecated.  
 void setParent(CompositeContext parent)
          Sets the parent context
 void setURI(java.lang.String uri)
           
 
Methods inherited from interface org.apache.tuscany.core.context.Context
getInstance
 
Methods inherited from interface org.apache.tuscany.core.context.EventPublisher
addListener, addListener, publish, removeListener
 
Methods inherited from interface org.apache.tuscany.core.context.Lifecycle
getLifecycleState, getName, setName, start, stop
 

Method Detail

getURI

java.lang.String getURI()

setURI

void setURI(java.lang.String uri)

setAssemblyContext

void setAssemblyContext(org.apache.tuscany.model.assembly.AssemblyContext context)
Deprecated. 

TODO remove this method


getParent

CompositeContext getParent()
Returns the parent context, or null if the context does not have one


setParent

void setParent(CompositeContext parent)
Sets the parent context


registerModelObjects

void registerModelObjects(java.util.List<? extends org.apache.tuscany.model.assembly.Extensible> models)
                          throws ConfigurationException
Adds runtime artifacts represented by the set of model objects to the composite context by merging them with existing artifacts. Implementing classes may support only a subset of Part types.

Throws:
ConfigurationException
See Also:
Component, ModuleComponent, AtomicComponent, EntryPoint, ExternalService

registerModelObject

void registerModelObject(org.apache.tuscany.model.assembly.Extensible model)
                         throws ConfigurationException
Adds a runtime artifact represented by the model object to the composite context by merging it with existing artifacts. Implementing classes may support only a subset of Part types.

Throws:
ConfigurationException
See Also:
Component, ModuleComponent, AtomicComponent, EntryPoint, ExternalService

getContext

Context getContext(java.lang.String name)
Returns the child context associated with a given name


getComposite

@Deprecated
org.apache.tuscany.model.assembly.Composite getComposite()
Deprecated. 

Returns the composite managed by this composite context


removeContext

void removeContext(java.lang.String name)

Tuscany Core

-