blob: 1cac7ae69aab258dc32a3269bd13b3c73cc96e96 [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"
25 factory="factory.component.factory" >
26 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
27 </scr:component>
28
29 <!-- Component Factory Instances, requiring configuration -->
30 <scr:component name="factory.component.configuration"
31 enabled="false"
32 configuration-policy="require"
33 factory="factory.component.factory.configuration" >
34 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
35 </scr:component>
36
37 <!-- Component Factory Instances, requiring configuration -->
38 <scr:component name="factory.component.reference"
39 enabled="false"
40 configuration-policy="ignore"
41 factory="factory.component.factory.reference" >
42 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
43 <reference
44 name="ref"
45 interface="org.apache.felix.scr.integration.components.SimpleService"
46 cardinality="1..n"
47 policy="static"
48 bind="bindSimpleService"
49 unbind="unbindSimpleService"
50 target="(filterprop=required)"
51 />
52 </scr:component>
53
54 <!-- Component Factory Instances, instance is referred to by another component -->
55 <scr:component name="factory.component.referred"
56 enabled="false"
57 factory="factory.component.factory.referred" >
58 <implementation class="org.apache.felix.scr.integration.components.SimpleServiceImpl" />
59 <service>
60 <provide interface="org.apache.felix.scr.integration.components.SimpleService" />
61 </service>
62 </scr:component>
63
64 <!-- component has a reference to service created by the factory.component.referred factory component-->
65 <scr:component name="ComponentReferringToFactoryObject"
66 enabled="false"
67 immediate="true">
68 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
69 <property name="service.pid" value="ComponentReferringToFactoryObject" />
70 <reference
71 name="ref"
72 interface="org.apache.felix.scr.integration.components.SimpleService"
73 cardinality="1..1"
74 policy="dynamic"
75 bind="bindSimpleService"
76 unbind="unbindSimpleService"
77 target="(service.pid=myFactoryInstance)"
78 />
79 </scr:component>
80
David Jencks853b55b2013-10-25 07:04:03 +000081 <!-- Component Factory Instance, requiring configuration + 1 specific Reference -->
82 <scr:component name="factory.component.reference.targetfilter"
83 enabled="false"
84 configuration-policy="require"
85 factory="factory.component.reference.targetfilter" >
86 <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
87 <reference
88 name="ref"
89 interface="org.apache.felix.scr.integration.components.SimpleService"
90 cardinality="1..1"
91 policy="dynamic"
92 bind="bindSimpleService"
93 unbind="unbindSimpleService"
94 />
95 </scr:component>
96
David Jencksc72ea972013-05-28 05:57:44 +000097</components>