Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +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 ignores configuration --> |
| 23 | <scr:component name="SimpleComponent.configuration.ignore" |
| 24 | enabled="false" |
| 25 | configuration-policy="ignore"> |
| 26 | <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" /> |
Felix Meschberger | bbfc717 | 2009-08-03 19:16:00 +0000 | [diff] [blame] | 27 | <property name="service.pid" value="SimpleComponent.configuration.ignore" /> |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 28 | </scr:component> |
| 29 | |
| 30 | <!-- component takes configuration as available --> |
| 31 | <scr:component name="SimpleComponent.configuration.optional" |
| 32 | enabled="false" |
| 33 | configuration-policy="optional" > |
| 34 | <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" /> |
Felix Meschberger | bbfc717 | 2009-08-03 19:16:00 +0000 | [diff] [blame] | 35 | <property name="service.pid" value="SimpleComponent.configuration.optional" /> |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 36 | </scr:component> |
| 37 | |
| 38 | <!-- component requires configuration --> |
| 39 | <scr:component name="SimpleComponent.configuration.require" |
| 40 | enabled="false" |
| 41 | configuration-policy="require" > |
| 42 | <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" /> |
Felix Meschberger | bbfc717 | 2009-08-03 19:16:00 +0000 | [diff] [blame] | 43 | <property name="service.pid" value="SimpleComponent.configuration.require" /> |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 44 | </scr:component> |
| 45 | |
| 46 | <!-- component dynamically updates configuration --> |
| 47 | <scr:component name="DynamicConfigurationComponent" |
| 48 | enabled="false" modified="configure"> |
| 49 | <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" /> |
Felix Meschberger | bbfc717 | 2009-08-03 19:16:00 +0000 | [diff] [blame] | 50 | <property name="service.pid" value="DynamicConfigurationComponent" /> |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 51 | </scr:component> |
| 52 | |
Felix Meschberger | 738751a | 2012-05-31 16:51:54 +0000 | [diff] [blame] | 53 | <!-- component dynamically updates configuration with a required reference plus target--> |
| 54 | <scr:component name="DynamicConfigurationComponentWithRequiredReference" |
| 55 | enabled="false" modified="configure"> |
| 56 | <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" /> |
| 57 | <property name="service.pid" value="DynamicConfigurationComponentWithRequiredReference" /> |
| 58 | <reference |
| 59 | name="ref" |
| 60 | interface="org.apache.felix.scr.integration.components.SimpleService" |
| 61 | cardinality="1..1" |
| 62 | policy="dynamic" |
David Jencks | a4af0eb | 2013-01-29 06:54:24 +0000 | [diff] [blame] | 63 | bind="setSimpleService" |
| 64 | unbind="unsetSimpleService" |
| 65 | target="(filterprop=__nothing__)" |
| 66 | /> |
| 67 | </scr:component> |
| 68 | |
| 69 | <scr:component name="DynamicConfigurationComponentWithOptionalReference" |
| 70 | enabled="false" modified="configure" immediate="true"> |
| 71 | <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" /> |
| 72 | <property name="service.pid" value="DynamicConfigurationComponentWithRequiredReference" /> |
| 73 | <reference |
| 74 | name="ref" |
| 75 | interface="org.apache.felix.scr.integration.components.SimpleService" |
| 76 | cardinality="0..1" |
| 77 | policy="dynamic" |
| 78 | bind="setSimpleService" |
| 79 | unbind="unsetSimpleService" |
Felix Meschberger | 738751a | 2012-05-31 16:51:54 +0000 | [diff] [blame] | 80 | target="(filterprop=__nothing__)" |
| 81 | /> |
| 82 | </scr:component> |
| 83 | |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 84 | <!-- component instances created by factory configuration --> |
| 85 | <scr:component name="FactoryConfigurationComponent" |
| 86 | enabled="false" |
| 87 | configuration-policy="require" > |
| 88 | <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" /> |
Felix Meschberger | bbfc717 | 2009-08-03 19:16:00 +0000 | [diff] [blame] | 89 | <property name="service.pid" value="FactoryConfigurationComponent" /> |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 90 | </scr:component> |
Felix Meschberger | 4dab8ea | 2009-07-31 14:44:12 +0000 | [diff] [blame] | 91 | |
Felix Meschberger | f96e10c | 2010-03-24 08:15:51 +0000 | [diff] [blame] | 92 | <!-- component instances created by factory configuration --> |
| 93 | <scr:component name="FactoryConfigurationComponent_enabled" |
| 94 | enabled="true" |
| 95 | configuration-policy="require" > |
| 96 | <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" /> |
| 97 | <property name="service.pid" value="FactoryConfigurationComponent" /> |
| 98 | </scr:component> |
| 99 | |
Felix Meschberger | 639f83a | 2009-10-29 14:44:54 +0000 | [diff] [blame] | 100 | <!-- component is a simple service to verify non-use of private props --> |
Felix Meschberger | 4dab8ea | 2009-07-31 14:44:12 +0000 | [diff] [blame] | 101 | <scr:component name="ServiceComponent" |
| 102 | enabled="false" immediate="true" |
| 103 | configuration-policy="ignore" > |
| 104 | <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" /> |
Felix Meschberger | bbfc717 | 2009-08-03 19:16:00 +0000 | [diff] [blame] | 105 | <property name="service.pid" value="ServiceComponent" /> |
Felix Meschberger | 4dab8ea | 2009-07-31 14:44:12 +0000 | [diff] [blame] | 106 | <property name="prop.public" value="required" /> |
| 107 | <property name=".prop.private" value="private" /> |
| 108 | <service> |
| 109 | <provide interface="java.lang.Object" /> |
| 110 | </service> |
| 111 | </scr:component> |
| 112 | |
Felix Meschberger | 639f83a | 2009-10-29 14:44:54 +0000 | [diff] [blame] | 113 | <!-- component is a simple service to verify deactivation when not being used any longer --> |
| 114 | <scr:component name="DelayedServiceComponent" |
| 115 | enabled="false" immediate="false" |
| 116 | configuration-policy="ignore" > |
| 117 | <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" /> |
| 118 | <property name="service.pid" value="ServiceComponent" /> |
| 119 | <service> |
| 120 | <provide interface="java.lang.Object" /> |
| 121 | </service> |
| 122 | </scr:component> |
| 123 | |
David Jencks | 1511632 | 2012-08-11 02:49:37 +0000 | [diff] [blame] | 124 | |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 125 | </components> |