Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 468e0e560e3441879fcaacdfcdbfea17c72afb0c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:osgi="http://www.springframework.org/schema/osgi"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
                      http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd">

    <osgi:service ref="injected-export">
        <osgi:interfaces>
            <value>java.io.Serializable</value>
            <value>java.lang.Cloneable</value>
        </osgi:interfaces>
        <osgi:service-properties>
            <entry key="type" value="injected-deps"/>
        </osgi:service-properties>
    </osgi:service>


    <bean id="injected-export" class="org.springframework.osgi.iandt.dependency.SimpleComponent">
        <property name="optionalDependency" ref="optional"/>
        <property name="mandatoryDependency" ref="mandatory"/>
    </bean>

    <osgi:service depends-on="optional mandatory" ref="depends-on-export">
        <osgi:interfaces>
            <value>java.io.Serializable</value>
            <value>java.lang.Cloneable</value>
        </osgi:interfaces>
    </osgi:service>
    
    <bean id="depends-on-export" class="org.springframework.osgi.iandt.dependency.SimpleComponent"/>

    
    <osgi:reference id="optional" interface="java.util.SortedSet" cardinality="0..1"/>
    <osgi:reference id="mandatory" interface="java.util.SortedMap" cardinality="1..1"/>
</beans>

Back to the top