|
Tuscany Core | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface WireBuilder
Implementations perform the second phase of converting a logical model representing an assembly into a series of
runtime or executable artifacts. Specifically, they are responsible for finalizing target-side proxy factories and
bridging InvocationConfiguration
s held by source- and target-side proxy
factories. WireBuilder
s generally operate by target implementation type. In other words, for a wire
from a Java source to a JavaScript target, the Javascript WireBuilder
will complete the wire. This is
necessary as a WireBuilder
must set a TargetInvoker
that is
responsible for dispatching to an implementation on the source side of the wire.
Runtimes are generally configured with a DefaultWireBuilder
as a
top-most wire builder, which delegates to other builders wired to it as part of a system configuration.
Wire builders may optimize the wire chains based on certain characteristics of th wire, such as source and target scopes.
ContextFactoryBuilder
,
DefaultWireBuilder
Method Summary | |
---|---|
void |
completeTargetChain(TargetWireFactory<?> targetFactory,
java.lang.Class targetType,
ScopeContext targetScopeContext)
Finishes processing the target side wire chain. |
void |
connect(SourceWireFactory<?> sourceFactory,
TargetWireFactory<?> targetFactory,
java.lang.Class targetType,
boolean downScope,
ScopeContext targetScopeContext)
Connects wire configurations of the source proxy factory to corresponding ones in the target proxy to factory |
Method Detail |
---|
void connect(SourceWireFactory<?> sourceFactory, TargetWireFactory<?> targetFactory, java.lang.Class targetType, boolean downScope, ScopeContext targetScopeContext) throws BuilderConfigException
sourceFactory
- the proxy factory used in constructing the source side of the wire chaintargetFactory
- the proxy factory used in constructing the target side of the wire chaintargetType
- the context type of the target. Used to determine if a paricular wire builder should construct
the wiredownScope
- true if the component containing the reference (source side) is of a lesser scope than the
target servicetargetScopeContext
- the scope context responsible for managing intance contexts of the target component
type
BuilderConfigException
- if an error occurs during the wire buildSource processvoid completeTargetChain(TargetWireFactory<?> targetFactory, java.lang.Class targetType, ScopeContext targetScopeContext) throws BuilderConfigException
TargetInvoker
used by target-side proxies is usually set during this
phase.
targetFactory
- the target-side proxy factorytargetType
- the target context typetargetScopeContext
- the target scope
BuilderConfigException
- if an error occurs during the wire buildSource process
|
Tuscany Core | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |