| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| --> |
| <components xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" |
| xmlns:felix="http://felix.apache.org/xmlns/scr/extensions/v1.0.0"> |
| |
| <!-- Component Factory Instances --> |
| <scr:component name="factory.component" |
| felix:persistentFactoryComponent="true" |
| enabled="false" |
| factory="factory.component.factory" > |
| <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" /> |
| </scr:component> |
| |
| <!-- Component Factory Instances, requiring configuration --> |
| <scr:component name="factory.component.configuration" |
| felix:persistentFactoryComponent="true" |
| enabled="false" |
| configuration-policy="require" |
| factory="factory.component.factory.configuration" |
| modified="modified"> |
| <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" /> |
| </scr:component> |
| |
| <scr:component name="factory.component.configuration.optional" |
| felix:persistentFactoryComponent="true" |
| enabled="false" |
| configuration-policy="optional" |
| factory="factory.component.factory.configuration.optional" |
| modified="modified" > |
| <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" /> |
| </scr:component> |
| |
| <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.3.0" name="factory.component.configuration.optional.13" |
| felix:persistentFactoryComponent="true" |
| enabled="false" |
| configuration-policy="optional" |
| factory="factory.component.factory.configuration.optional.13" |
| modified="modified" > |
| <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" /> |
| </scr:component> |
| |
| <scr:component name="factory.component.configuration.optional.nomodify" |
| felix:persistentFactoryComponent="true" |
| enabled="false" |
| configuration-policy="optional" |
| factory="factory.component.factory.configuration.optional.nomodify"> |
| <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" /> |
| </scr:component> |
| |
| <!-- Component Factory Instances, requiring configuration --> |
| <scr:component name="factory.component.reference" |
| felix:persistentFactoryComponent="true" |
| enabled="false" |
| configuration-policy="ignore" |
| factory="factory.component.factory.reference" > |
| <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" /> |
| <reference |
| name="ref" |
| interface="org.apache.felix.scr.integration.components.SimpleService" |
| cardinality="1..n" |
| policy="static" |
| bind="bindSimpleService" |
| unbind="unbindSimpleService" |
| target="(filterprop=required)" |
| /> |
| </scr:component> |
| |
| <!-- Component Factory Instances, instance is referred to by another component --> |
| <scr:component name="factory.component.referred" |
| felix:persistentFactoryComponent="true" |
| enabled="false" |
| factory="factory.component.factory.referred" > |
| <implementation class="org.apache.felix.scr.integration.components.SimpleServiceImpl" /> |
| <service> |
| <provide interface="org.apache.felix.scr.integration.components.SimpleService" /> |
| </service> |
| </scr:component> |
| |
| <!-- component has a reference to service created by the factory.component.referred factory component--> |
| <scr:component name="ComponentReferringToFactoryObject" |
| enabled="false" |
| immediate="true"> |
| <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" /> |
| <property name="service.pid" value="ComponentReferringToFactoryObject" /> |
| <reference |
| name="ref" |
| interface="org.apache.felix.scr.integration.components.SimpleService" |
| cardinality="1..1" |
| policy="dynamic" |
| bind="bindSimpleService" |
| unbind="unbindSimpleService" |
| target="(service.pid=myFactoryInstance)" |
| /> |
| </scr:component> |
| |
| <!-- Component Factory Instance, requiring configuration + 1 specific Reference --> |
| <scr:component name="factory.component.reference.targetfilter" |
| felix:persistentFactoryComponent="true" |
| enabled="false" |
| configuration-policy="require" |
| factory="factory.component.reference.targetfilter" > |
| <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" /> |
| <reference |
| name="ref" |
| interface="org.apache.felix.scr.integration.components.SimpleService" |
| cardinality="1..1" |
| policy="dynamic" |
| bind="bindSimpleService" |
| unbind="unbindSimpleService" |
| /> |
| </scr:component> |
| |
| </components> |