blob: a5778a3fdb0c6a63dae1bc0ce8334b9b45571208 [file] [log] [blame]
David Jencks445be022014-04-30 18:01:34 +00001<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 Licensed to the Apache Software Foundation (ASF) under one
4 or more contributor license agreements. See the NOTICE file
5 distributed with this work for additional information
6 regarding copyright ownership. The ASF licenses this file
7 to you under the Apache License, Version 2.0 (the
8 "License"); you may not use this file except in compliance
9 with the License. You may obtain a copy of the License at
10
11 http://www.apache.org/licenses/LICENSE-2.0
12
13 Unless required by applicable law or agreed to in writing,
14 software distributed under the License is distributed on an
15 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 KIND, either express or implied. See the License for the
17 specific language governing permissions and limitations
18 under the License.
19-->
20<components xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0"
21 xmlns:felix="http://felix.apache.org/xmlns/scr/extensions/v1.0.0">
22
23 <!-- Component Factory Instances -->
24 <scr:component name="factory.component"
25 felix:persistentFactoryComponent="true"
26 enabled="false"
27 factory="factory.component.factory" >
28 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
29 </scr:component>
30
31 <!-- Component Factory Instances, requiring configuration -->
32 <scr:component name="factory.component.configuration"
33 felix:persistentFactoryComponent="true"
34 enabled="false"
35 configuration-policy="require"
David Jencks73c801f2014-08-02 03:04:08 +000036 factory="factory.component.factory.configuration"
37 modified="modified">
David Jencks445be022014-04-30 18:01:34 +000038 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
39 </scr:component>
40
David Jencks7a384a62014-08-02 03:04:11 +000041 <scr:component name="factory.component.configuration.optional"
42 felix:persistentFactoryComponent="true"
43 enabled="false"
44 configuration-policy="optional"
45 factory="factory.component.factory.configuration.optional"
46 modified="modified" >
47 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
48 </scr:component>
49
50 <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.3.0" name="factory.component.configuration.optional.13"
51 felix:persistentFactoryComponent="true"
52 enabled="false"
53 configuration-policy="optional"
54 factory="factory.component.factory.configuration.optional.13"
55 modified="modified" >
56 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
57 </scr:component>
58
59 <scr:component name="factory.component.configuration.optional.nomodify"
60 felix:persistentFactoryComponent="true"
61 enabled="false"
62 configuration-policy="optional"
63 factory="factory.component.factory.configuration.optional.nomodify">
64 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
65 </scr:component>
66
David Jencks445be022014-04-30 18:01:34 +000067 <!-- Component Factory Instances, requiring configuration -->
68 <scr:component name="factory.component.reference"
69 felix:persistentFactoryComponent="true"
70 enabled="false"
71 configuration-policy="ignore"
72 factory="factory.component.factory.reference" >
73 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
74 <reference
75 name="ref"
76 interface="org.apache.felix.scr.integration.components.SimpleService"
77 cardinality="1..n"
78 policy="static"
79 bind="bindSimpleService"
80 unbind="unbindSimpleService"
81 target="(filterprop=required)"
82 />
83 </scr:component>
84
85 <!-- Component Factory Instances, instance is referred to by another component -->
86 <scr:component name="factory.component.referred"
87 felix:persistentFactoryComponent="true"
88 enabled="false"
89 factory="factory.component.factory.referred" >
90 <implementation class="org.apache.felix.scr.integration.components.SimpleServiceImpl" />
91 <service>
92 <provide interface="org.apache.felix.scr.integration.components.SimpleService" />
93 </service>
94 </scr:component>
95
96 <!-- component has a reference to service created by the factory.component.referred factory component-->
97 <scr:component name="ComponentReferringToFactoryObject"
98 enabled="false"
99 immediate="true">
100 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
101 <property name="service.pid" value="ComponentReferringToFactoryObject" />
102 <reference
103 name="ref"
104 interface="org.apache.felix.scr.integration.components.SimpleService"
105 cardinality="1..1"
106 policy="dynamic"
107 bind="bindSimpleService"
108 unbind="unbindSimpleService"
109 target="(service.pid=myFactoryInstance)"
110 />
111 </scr:component>
112
113 <!-- Component Factory Instance, requiring configuration + 1 specific Reference -->
114 <scr:component name="factory.component.reference.targetfilter"
115 felix:persistentFactoryComponent="true"
116 enabled="false"
117 configuration-policy="require"
118 factory="factory.component.reference.targetfilter" >
119 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
120 <reference
121 name="ref"
122 interface="org.apache.felix.scr.integration.components.SimpleService"
123 cardinality="1..1"
124 policy="dynamic"
125 bind="bindSimpleService"
126 unbind="unbindSimpleService"
127 />
128 </scr:component>
129
130</components>