Implementations are responsible for managing source or target sides of a wire, including creation of service proxies. Source-side wires are injected on references and may contain policy interceptors and/or handlers specified by them. Target-side wires may contain policy interceptors and/or handlers specified by the service the wire is targeted to or one of its operations. Source- and target-side
WireFactory
s are held in the {@link org.apache.tuscany.core.builder.ContextFactory}associated with the source reference or target service.
When an assembly is built by the runtime, source-side and target-side wires are "bridged" on the source side (i.e. a reference to the target-side is stored in the source-side). This bridging process is done by a series of {@link org.apache.tuscany.core.builder.WireBuilder}s configured in the runtime. When a new component implementation instance is created, it will be injected with a proxy for each reference containing the bridged source- and target-side wires.
Unmanaged code, i.e. clients that are not components, that perform a locate operation are handled differently. In this case, a target-side proxy will be returned by the locate operation created by the
WireFactory
associated with the target service. This target-side proxy will only contain the target-side wire and its handlers/interceptors.�
Wires are structured by operation; that is, they contain an invocation chain per operation on a service. Note that the service specified by a reference may differ in type from the target service specified by the wire. In this case, a mediation may be performed by the runtime. Hence, source-to-target bridging is done on a per operation basis. Source- and target-side Invocation chains are accessible through the subtypes of
WireFactory
.
@version $Rev: 408581 $ $Date: 2006-05-21 23:34:24 -0700 (Sun, 21 May 2006) $