blob: 86a784b1d3d076e5d5ebc33a87a3ba6b0a9ca314 [file] [log] [blame]
Felix Meschberger47eb0372009-07-28 13:48:28 +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
22 <!-- component ignores configuration -->
23 <scr:component name="SimpleComponent.configuration.ignore"
24 enabled="false"
25 configuration-policy="ignore">
26 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
Felix Meschbergerbbfc7172009-08-03 19:16:00 +000027 <property name="service.pid" value="SimpleComponent.configuration.ignore" />
Felix Meschberger47eb0372009-07-28 13:48:28 +000028 </scr:component>
29
30 <!-- component takes configuration as available -->
31 <scr:component name="SimpleComponent.configuration.optional"
32 enabled="false"
33 configuration-policy="optional" >
34 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
Felix Meschbergerbbfc7172009-08-03 19:16:00 +000035 <property name="service.pid" value="SimpleComponent.configuration.optional" />
Felix Meschberger47eb0372009-07-28 13:48:28 +000036 </scr:component>
37
38 <!-- component requires configuration -->
39 <scr:component name="SimpleComponent.configuration.require"
40 enabled="false"
41 configuration-policy="require" >
42 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
Felix Meschbergerbbfc7172009-08-03 19:16:00 +000043 <property name="service.pid" value="SimpleComponent.configuration.require" />
Felix Meschberger47eb0372009-07-28 13:48:28 +000044 </scr:component>
45
46 <!-- component dynamically updates configuration -->
47 <scr:component name="DynamicConfigurationComponent"
48 enabled="false" modified="configure">
49 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
Felix Meschbergerbbfc7172009-08-03 19:16:00 +000050 <property name="service.pid" value="DynamicConfigurationComponent" />
Felix Meschberger47eb0372009-07-28 13:48:28 +000051 </scr:component>
52
David Jencksacb83212014-04-30 18:01:44 +000053 <scr13:component xmlns:scr13="http://www.osgi.org/xmlns/scr/v1.3.0" name="DynamicConfigurationComponent13"
54 enabled="false" modified="configure">
55 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
56 <property name="service.pid" value="DynamicConfigurationComponent13" />
57 </scr13:component>
58
59 <scr:component xmlns:felix="http://felix.apache.org/xmlns/scr/extensions/v1.0.0" name="DynamicConfigurationComponentFlag"
60 enabled="false" modified="configure"
61 felix:deleteCallsModify="true">
62 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
63 <property name="service.pid" value="DynamicConfigurationComponentFlag" />
64 </scr:component>
65
Felix Meschberger738751a2012-05-31 16:51:54 +000066 <!-- component dynamically updates configuration with a required reference plus target-->
67 <scr:component name="DynamicConfigurationComponentWithRequiredReference"
68 enabled="false" modified="configure">
69 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
70 <property name="service.pid" value="DynamicConfigurationComponentWithRequiredReference" />
71 <reference
72 name="ref"
73 interface="org.apache.felix.scr.integration.components.SimpleService"
74 cardinality="1..1"
75 policy="dynamic"
David Jencksa4af0eb2013-01-29 06:54:24 +000076 bind="setSimpleService"
77 unbind="unsetSimpleService"
78 target="(filterprop=__nothing__)"
79 />
80 </scr:component>
81
82 <scr:component name="DynamicConfigurationComponentWithOptionalReference"
83 enabled="false" modified="configure" immediate="true">
84 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
85 <property name="service.pid" value="DynamicConfigurationComponentWithRequiredReference" />
86 <reference
87 name="ref"
88 interface="org.apache.felix.scr.integration.components.SimpleService"
89 cardinality="0..1"
90 policy="dynamic"
91 bind="setSimpleService"
92 unbind="unsetSimpleService"
Felix Meschberger738751a2012-05-31 16:51:54 +000093 target="(filterprop=__nothing__)"
94 />
95 </scr:component>
96
Felix Meschberger47eb0372009-07-28 13:48:28 +000097 <!-- component instances created by factory configuration -->
98 <scr:component name="FactoryConfigurationComponent"
99 enabled="false"
100 configuration-policy="require" >
101 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
Felix Meschbergerbbfc7172009-08-03 19:16:00 +0000102 <property name="service.pid" value="FactoryConfigurationComponent" />
Felix Meschberger47eb0372009-07-28 13:48:28 +0000103 </scr:component>
Felix Meschberger4dab8ea2009-07-31 14:44:12 +0000104
Felix Meschbergerf96e10c2010-03-24 08:15:51 +0000105 <!-- component instances created by factory configuration -->
106 <scr:component name="FactoryConfigurationComponent_enabled"
107 enabled="true"
108 configuration-policy="require" >
109 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
110 <property name="service.pid" value="FactoryConfigurationComponent" />
111 </scr:component>
112
Felix Meschberger639f83a2009-10-29 14:44:54 +0000113 <!-- component is a simple service to verify non-use of private props -->
Felix Meschberger4dab8ea2009-07-31 14:44:12 +0000114 <scr:component name="ServiceComponent"
115 enabled="false" immediate="true"
116 configuration-policy="ignore" >
117 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
Felix Meschbergerbbfc7172009-08-03 19:16:00 +0000118 <property name="service.pid" value="ServiceComponent" />
Felix Meschberger4dab8ea2009-07-31 14:44:12 +0000119 <property name="prop.public" value="required" />
120 <property name=".prop.private" value="private" />
121 <service>
122 <provide interface="java.lang.Object" />
123 </service>
124 </scr:component>
125
Felix Meschberger639f83a2009-10-29 14:44:54 +0000126 <!-- component is a simple service to verify deactivation when not being used any longer -->
127 <scr:component name="DelayedServiceComponent"
128 enabled="false" immediate="false"
129 configuration-policy="ignore" >
130 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
131 <property name="service.pid" value="ServiceComponent" />
132 <service>
133 <provide interface="java.lang.Object" />
134 </service>
135 </scr:component>
136
David Jencks445be022014-04-30 18:01:34 +0000137 <scr:component name="DelayedKeepInstancesServiceComponent"
138 enabled="false" immediate="false"
139 configuration-policy="ignore"
140 xmlns:felix="http://felix.apache.org/xmlns/scr/extensions/v1.0.0"
141 felix:delayedKeepInstances="true" >
142 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent"/>
143 <property name="service.pid" value="ServiceComponent" />
144 <service>
145 <provide interface="java.lang.Object" />
146 </service>
147 </scr:component>
148
David Jencks15116322012-08-11 02:49:37 +0000149
Felix Meschberger47eb0372009-07-28 13:48:28 +0000150</components>