You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Reference/Service Wiring Cases: 

Component Reference

Component Service

Effective Wire

<component name="C1">
            <reference name="R1" target="C2/S1">
                    <binding.sca/>
                    <binding.y/>
            </reference>
</component>

<component name="C2">
            <service name="S1">
                        <binding.sca/>
            </service>
</component>

C1/R1 -- binding.sca --> C2/S1

<component name="C2">
            <service name="S1">
                        <binding.y/>
            </service>
</component>

C1/R1 -- binding.y --> C2/S1

<component name="C2">
            <service name="S1">
                        <binding.x/>
            </service>
</component>

Invalid (no matching binding)

<component name="C1">
            <reference name="R1" target="C2/S1 C3/S1">
                    <binding.sca/>
                    <binding.y/>
            </reference>
</component>

<component name="C2">
            <service name="S1">
                        <binding.sca/>
            </service>
</component>
<component name="C3">
            <service name="S1">
                        <binding.y/>
            </service>
</component>

Two wires:
1.     C1/R1àC2/S1 (binding.sca)
2.     C1/R1àC3/S1 (binding.y)

<reference name="R1" multiplicity="1..1">
            <binding.x uri="http://a"/>
            <binding.y uri="http://b"/>
</reference>

 

Is this valid to have more than bindings with explicit URIs for a reference with multiplity 0..1 or 1..1?

<reference name="R1" multiplicity="1..N">
            <binding.x uri="http://a"/>
            <binding.y uri="http://b"/>
</reference>

 

Are there two wires?
C1/R1 à

http://a

(binding.x)
C1/R1 à

http://b

(binding.y)
Are the following references equivalent if the multiplicity is 1..N or 0..N?
<reference name="R1" target="C2/S1 C3/S1">            <binding.sca/>
</reference>
<reference name="R1">
            <binding.sca uri="C2/S1"/>
            <binding.sca uri="C3/S1"/>
</reference>

  
 

Reference Promotion Cases: 

Component Reference

Composite Reference

Effective Wire

Multiplicity = 1..1
<component name="C1">
    <reference name="R1" target="C2/S1">
    </reference>
</component>

<reference name="R1" promote="C1/R1">
<binding.x>
</reference>

C1/R1àC2/S1 (binding.x)

Multiplicity = 1..1
<component name="C1">
    <reference name="R1" target="C2/S1">
    </reference></component>

<reference name="R1" promote="C1/R1" target="C3/S1">
<binding.x>
</reference>

Is it valid to override the target?

Multiplicity = 1..N
<component name="C1">
    <reference name="R1" target="C2/S1">
    </reference>
</component>

<reference name="R1" promote="C1/R1">
<binding.x uri="http://a">
</reference>

C1/R1àC2/S1 (binding.sca)
C1/R1à

http://a

(binding.x) (Spec line 1071: Component services and component references can be promoted to composite services and references and also be wired internally within the composite at the same time. For a reference, this only makes sense if the reference supports a multiplicity greater than 1.)

Multiplicity = 1..N
<component name="C1">
    <reference name="R1" target="C2/S1">
    </reference></component>

<reference name="R1" promote="C1/R1" target="C3/S1">
</reference>

C1/R1àC2/S1 (binding.sca)
C1/R1àC3/S1 (binding.sca)?

 

  • No labels