blob: 98ce7125cc5874dcf4d8cfaf0255b09b4b8a9f96 [file] [log] [blame]
David Jencksc72ea972013-05-28 05:57:44 +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 Factory Instances -->
23 <scr:component name="factory.component"
24 enabled="false"
David Jencks125d3772014-06-15 01:10:25 +000025 modified="modified"
David Jencksc72ea972013-05-28 05:57:44 +000026 factory="factory.component.factory" >
27 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
28 </scr:component>
29
30 <!-- Component Factory Instances, requiring configuration -->
31 <scr:component name="factory.component.configuration"
32 enabled="false"
33 configuration-policy="require"
David Jencks73c801f2014-08-02 03:04:08 +000034 factory="factory.component.factory.configuration"
35 modified="modified" >
David Jencksc72ea972013-05-28 05:57:44 +000036 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
37 </scr:component>
38
A. J. David Bosschaert780582a2015-02-11 11:36:34 +000039 <scr:component name="factory.component.configuration.obsolete"
40 enabled="false"
41 configuration-policy="require"
42 xmlns:felix="http://felix.apache.org/xmlns/scr/extensions/v1.0.0"
43 felix:obsoleteFactoryComponentFactory="true" >
44 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
45 <property name="foo">bar</property>
46 </scr:component>
47
David Jencks7a384a62014-08-02 03:04:11 +000048 <scr:component name="factory.component.configuration.optional"
49 enabled="false"
50 configuration-policy="optional"
51 factory="factory.component.factory.configuration.optional"
52 modified="modified" >
53 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
54 </scr:component>
55
56 <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.3.0" name="factory.component.configuration.optional.13"
57 enabled="false"
58 configuration-policy="optional"
59 factory="factory.component.factory.configuration.optional.13"
60 modified="modified" >
61 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
62 </scr:component>
63
64 <scr:component name="factory.component.configuration.optional.nomodify"
65 enabled="false"
66 configuration-policy="optional"
67 factory="factory.component.factory.configuration.optional.nomodify">
68 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
69 </scr:component>
70
David Jencksc72ea972013-05-28 05:57:44 +000071 <scr:component name="factory.component.reference"
72 enabled="false"
73 configuration-policy="ignore"
74 factory="factory.component.factory.reference" >
75 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
76 <reference
77 name="ref"
78 interface="org.apache.felix.scr.integration.components.SimpleService"
79 cardinality="1..n"
80 policy="static"
81 bind="bindSimpleService"
82 unbind="unbindSimpleService"
83 target="(filterprop=required)"
84 />
85 </scr:component>
86
87 <!-- Component Factory Instances, instance is referred to by another component -->
88 <scr:component name="factory.component.referred"
89 enabled="false"
90 factory="factory.component.factory.referred" >
91 <implementation class="org.apache.felix.scr.integration.components.SimpleServiceImpl" />
92 <service>
93 <provide interface="org.apache.felix.scr.integration.components.SimpleService" />
94 </service>
95 </scr:component>
96
97 <!-- component has a reference to service created by the factory.component.referred factory component-->
98 <scr:component name="ComponentReferringToFactoryObject"
99 enabled="false"
100 immediate="true">
101 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
102 <property name="service.pid" value="ComponentReferringToFactoryObject" />
103 <reference
104 name="ref"
105 interface="org.apache.felix.scr.integration.components.SimpleService"
106 cardinality="1..1"
107 policy="dynamic"
108 bind="bindSimpleService"
109 unbind="unbindSimpleService"
110 target="(service.pid=myFactoryInstance)"
111 />
112 </scr:component>
113
David Jencks853b55b2013-10-25 07:04:03 +0000114 <!-- Component Factory Instance, requiring configuration + 1 specific Reference -->
115 <scr:component name="factory.component.reference.targetfilter"
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
David Jencksc72ea972013-05-28 05:57:44 +0000130</components>