Implementations create {@link org.apache.tuscany.core.context.Context}s based on an assembly configuration.
Context factories are "built" in two phases. {@link ContextFactoryBuilder}s analyze an assembly, producing
ContextFactory
s for {@link org.apache.tuscany.model.assembly.Component}s, {@link org.apache.tuscany.model.assembly.EntryPoint}s, and {@link org.apache.tuscany.model.assembly.ExternalService}s. During this phase, {@link org.apache.tuscany.core.wire.WireFactory}s for source- and target-side wires are produced for the
ContextFactory
s. �
The second build phase connects the source- and target-side
WireFactories
, thereby completing wire configuration.
At runtime,
ContextFactory
s are called to create new
Context
s when a new implementation instance is required for a component, entry point, or external service. The
Context
is then responsible for instantiating and managing the actual implementation instance. When a
Context
creates a new instance, the previously configured
WireFactory
s are used to create wires to and from the instance. A wire is a collection of stateless invocation chains that are managed by the
Context
's
ContextFactory
.
@version $Rev: 385747 $ $Date: 2006-03-13 22:12:53 -0800 (Mon, 13 Mar 2006) $