blob: 98ce7125cc5874dcf4d8cfaf0255b09b4b8a9f96 [file] [log] [blame]
<?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">
<!-- Component Factory Instances -->
<scr:component name="factory.component"
enabled="false"
modified="modified"
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"
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.obsolete"
enabled="false"
configuration-policy="require"
xmlns:felix="http://felix.apache.org/xmlns/scr/extensions/v1.0.0"
felix:obsoleteFactoryComponentFactory="true" >
<implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
<property name="foo">bar</property>
</scr:component>
<scr:component name="factory.component.configuration.optional"
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"
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"
enabled="false"
configuration-policy="optional"
factory="factory.component.factory.configuration.optional.nomodify">
<implementation class="org.apache.felix.scr.integration.components.SimpleComponent" />
</scr:component>
<scr:component name="factory.component.reference"
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"
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"
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>