blob: c5651b4ce8413c744da3a2dc7407db04eaf64179 [file] [log] [blame]
Felix Meschberger40a26772009-10-06 14:13:14 +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-->
David Jencks8a148862013-07-15 23:15:40 +000020<components xmlns:scr="http://www.osgi.org/xmlns/scr/v1.2.0">
Felix Meschberger40a26772009-10-06 14:13:14 +000021
22 <!--
23 Components used for the ComponentActivationTest integration test.
24 This tests components with and without activate/deactivate method
25 configured and with and without activate/deactivate methods present
26 -->
27
28 <!-- no declaration of activate/deactivate methods -->
29 <scr:component name="ActivatorComponent.no.decl"
30 enabled="false">
31 <implementation class="org.apache.felix.scr.integration.components.ActivatorComponent" />
32 </scr:component>
33
34 <!-- wrong declaration of activate method -->
35 <scr:component name="ActivatorComponent.activate.missing"
36 enabled="false"
37 activate="nonExistingActivate">
38 <implementation class="org.apache.felix.scr.integration.components.ActivatorComponent" />
39 </scr:component>
40
41 <!-- wrong declaration of deactivate method -->
42 <scr:component name="ActivatorComponent.deactivate.missing"
43 enabled="false"
44 deactivate="nonExistingDeactivate">
45 <implementation class="org.apache.felix.scr.integration.components.ActivatorComponent" />
46 </scr:component>
47
48 <!-- correct declaration of activate and deactivate method -->
49 <scr:component name="ActivatorComponent.decl"
50 enabled="false"
51 activate="myActivate"
52 deactivate="myDeactivate">
53 <implementation class="org.apache.felix.scr.integration.components.ActivatorComponent" />
54 </scr:component>
55
56 <!-- correct declaration of activate and deactivate method, activate failure -->
57 <scr:component name="ActivatorComponent.activate.fail"
58 enabled="false"
59 activate="myActivate"
60 deactivate="myDeactivate">
61 <implementation class="org.apache.felix.scr.integration.components.ActivatorComponent" />
62 <property name="failActivate" value="true" />
63 </scr:component>
64
65 <!-- correct declaration of activate and deactivate method, deactivate failure -->
66 <scr:component name="ActivatorComponent.deactivate.fail"
67 enabled="false"
68 activate="myActivate"
69 deactivate="myDeactivate">
70 <implementation class="org.apache.felix.scr.integration.components.ActivatorComponent" />
71 <property name="failDeactivate" value="true" />
72 </scr:component>
Felix Meschberger89a24c92012-11-13 23:40:56 +000073
74 <!-- bind service during activate -->
75 <scr:component name="ActivatorComponent.activate.with.bind"
76 enabled="false"
77 activate="myActivate"
78 deactivate="myDeactivate">
79 <implementation class="org.apache.felix.scr.integration.components.ActivatorComponent" />
80 <property name="registerService" value="true" />
81 <reference
82 name="service"
83 interface="org.apache.felix.scr.integration.components.SimpleService"
84 bind="bindSimpleService"
85 unbind="unbindSimpleService"
86 policy="dynamic"
87 cardinality="0..n"
88 />
89 </scr:component>
Felix Meschbergerf56535b2012-11-15 14:57:46 +000090
91 <!-- bind service during activate -->
92 <scr:component name="ActivatorComponent.activate.delayed.with.bind"
93 enabled="false"
94 activate="myActivate"
95 deactivate="myDeactivate">
96 <implementation class="org.apache.felix.scr.integration.components.ActivatorComponent" />
97 <service factory="false">
98 <provide interface="org.apache.felix.scr.integration.components.ActivatorComponent"/>
99 </service>
100 <property name="registerService" value="true" />
101 <reference
102 name="service"
103 interface="org.apache.felix.scr.integration.components.SimpleService"
104 bind="bindSimpleService"
105 unbind="unbindSimpleService"
106 policy="dynamic"
107 cardinality="0..n"
108 />
109 </scr:component>
110
111 <!-- bind service during activate -->
112 <scr:component name="ActivatorComponent.activate.service.factory.with.bind"
113 enabled="false"
114 activate="myActivate"
115 deactivate="myDeactivate">
116 <implementation class="org.apache.felix.scr.integration.components.ActivatorComponent" />
117 <service factory="true">
118 <provide interface="org.apache.felix.scr.integration.components.ActivatorComponent"/>
119 </service>
120 <property name="registerService" value="true" />
121 <reference
122 name="service"
123 interface="org.apache.felix.scr.integration.components.SimpleService"
124 bind="bindSimpleService"
125 unbind="unbindSimpleService"
126 policy="dynamic"
127 cardinality="0..n"
128 />
129 </scr:component>
David Jencks1ff677d2013-07-15 23:15:37 +0000130
131 <!-- 11 static dependency -->
132 <scr:component name="ActivatorComponent.bind.single.static"
133 enabled="false"
134 activate="myActivate"
135 deactivate="myDeactivate">
136 <implementation class="org.apache.felix.scr.integration.components.ActivatorComponent" />
137 <service factory="false">
138 <provide interface="org.apache.felix.scr.integration.components.ActivatorComponent"/>
139 </service>
140 <property name="registerService" value="true" />
141 <reference
142 name="service"
143 interface="org.apache.felix.scr.integration.components.SimpleService"
144 bind="bindSimpleService"
145 unbind="unbindSimpleService"
146 policy="static"
147 cardinality="1..1"
148 />
149 </scr:component>
150
151 <!-- 1n static dependency -->
David Jencks8a148862013-07-15 23:15:40 +0000152 <scr:component name="ActivatorComponent.bind.multiple.static.reluctant"
David Jencks1ff677d2013-07-15 23:15:37 +0000153 enabled="false"
154 activate="myActivate"
155 deactivate="myDeactivate">
156 <implementation class="org.apache.felix.scr.integration.components.ActivatorComponent" />
157 <service factory="false">
158 <provide interface="org.apache.felix.scr.integration.components.ActivatorComponent"/>
159 </service>
160 <property name="registerService" value="true" />
161 <reference
162 name="service"
163 interface="org.apache.felix.scr.integration.components.SimpleService"
164 bind="bindSimpleService"
165 unbind="unbindSimpleService"
166 policy="static"
167 cardinality="1..n"
168 />
169 </scr:component>
170
David Jencks8a148862013-07-15 23:15:40 +0000171 <!-- 1n static greedy dependency -->
172 <scr:component name="ActivatorComponent.bind.multiple.static.greedy"
173 enabled="false"
174 activate="myActivate"
175 deactivate="myDeactivate">
176 <implementation class="org.apache.felix.scr.integration.components.ActivatorComponent" />
177 <service factory="false">
178 <provide interface="org.apache.felix.scr.integration.components.ActivatorComponent"/>
179 </service>
180 <property name="registerService" value="true" />
181 <reference
182 name="service"
183 interface="org.apache.felix.scr.integration.components.SimpleService"
184 bind="bindSimpleService"
185 unbind="unbindSimpleService"
186 policy="static"
187 policy-option="greedy"
188 cardinality="1..n"
189 />
190 </scr:component>
191
David Jencks1ff677d2013-07-15 23:15:37 +0000192 <!-- 11 dynamic dependency -->
193 <scr:component name="ActivatorComponent.bind.single.dynamic"
194 enabled="false"
195 activate="myActivate"
196 deactivate="myDeactivate">
197 <implementation class="org.apache.felix.scr.integration.components.ActivatorComponent" />
198 <service factory="false">
199 <provide interface="org.apache.felix.scr.integration.components.ActivatorComponent"/>
200 </service>
201 <property name="registerService" value="true" />
202 <reference
203 name="service"
204 interface="org.apache.felix.scr.integration.components.SimpleService"
205 bind="bindSimpleService"
206 unbind="unbindSimpleService"
207 policy="dynamic"
208 cardinality="1..1"
209 />
210 </scr:component>
211
David Jencks8a148862013-07-15 23:15:40 +0000212 <!-- 1n dynamic dependency -->
David Jencks1ff677d2013-07-15 23:15:37 +0000213 <scr:component name="ActivatorComponent.bind.multiple.dynamic"
214 enabled="false"
215 activate="myActivate"
216 deactivate="myDeactivate">
217 <implementation class="org.apache.felix.scr.integration.components.ActivatorComponent" />
218 <service factory="false">
219 <provide interface="org.apache.felix.scr.integration.components.ActivatorComponent"/>
220 </service>
221 <property name="registerService" value="true" />
222 <reference
223 name="service"
224 interface="org.apache.felix.scr.integration.components.SimpleService"
225 bind="bindSimpleService"
226 unbind="unbindSimpleService"
227 policy="dynamic"
228 cardinality="1..n"
229 />
230 </scr:component>
231
232
Felix Meschberger40a26772009-10-06 14:13:14 +0000233</components>