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