Felix Meschberger | 8c64e85 | 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 | 7e572cc | 2009-08-03 19:16:00 +0000 | [diff] [blame] | 27 | <property name="service.pid" value="SimpleComponent.configuration.ignore" /> |
Felix Meschberger | 8c64e85 | 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 | 7e572cc | 2009-08-03 19:16:00 +0000 | [diff] [blame] | 35 | <property name="service.pid" value="SimpleComponent.configuration.optional" /> |
Felix Meschberger | 8c64e85 | 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 | 7e572cc | 2009-08-03 19:16:00 +0000 | [diff] [blame] | 43 | <property name="service.pid" value="SimpleComponent.configuration.require" /> |
Felix Meschberger | 8c64e85 | 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 | 7e572cc | 2009-08-03 19:16:00 +0000 | [diff] [blame] | 50 | <property name="service.pid" value="DynamicConfigurationComponent" /> |
Felix Meschberger | 8c64e85 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 51 | </scr:component> |
| 52 | |
Felix Meschberger | f69954c | 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" |
| 63 | bind="bindSimpleService" |
| 64 | unbind="unbindSimpleService" |
| 65 | target="(filterprop=__nothing__)" |
| 66 | /> |
| 67 | </scr:component> |
| 68 | |
Felix Meschberger | 8c64e85 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 69 | <!-- component instances created by factory configuration --> |
| 70 | <scr:component name="FactoryConfigurationComponent" |
| 71 | enabled="false" |
| 72 | configuration-policy="require" > |
| 73 | <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" /> |
Felix Meschberger | 7e572cc | 2009-08-03 19:16:00 +0000 | [diff] [blame] | 74 | <property name="service.pid" value="FactoryConfigurationComponent" /> |
Felix Meschberger | 8c64e85 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 75 | </scr:component> |
Felix Meschberger | dcb192f | 2009-07-31 14:44:12 +0000 | [diff] [blame] | 76 | |
Felix Meschberger | 65bd35d | 2010-03-24 08:15:51 +0000 | [diff] [blame] | 77 | <!-- component instances created by factory configuration --> |
| 78 | <scr:component name="FactoryConfigurationComponent_enabled" |
| 79 | enabled="true" |
| 80 | configuration-policy="require" > |
| 81 | <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" /> |
| 82 | <property name="service.pid" value="FactoryConfigurationComponent" /> |
| 83 | </scr:component> |
| 84 | |
Felix Meschberger | d961cbf | 2009-10-29 14:44:54 +0000 | [diff] [blame] | 85 | <!-- component is a simple service to verify non-use of private props --> |
Felix Meschberger | dcb192f | 2009-07-31 14:44:12 +0000 | [diff] [blame] | 86 | <scr:component name="ServiceComponent" |
| 87 | enabled="false" immediate="true" |
| 88 | configuration-policy="ignore" > |
| 89 | <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" /> |
Felix Meschberger | 7e572cc | 2009-08-03 19:16:00 +0000 | [diff] [blame] | 90 | <property name="service.pid" value="ServiceComponent" /> |
Felix Meschberger | dcb192f | 2009-07-31 14:44:12 +0000 | [diff] [blame] | 91 | <property name="prop.public" value="required" /> |
| 92 | <property name=".prop.private" value="private" /> |
| 93 | <service> |
| 94 | <provide interface="java.lang.Object" /> |
| 95 | </service> |
| 96 | </scr:component> |
| 97 | |
Felix Meschberger | d961cbf | 2009-10-29 14:44:54 +0000 | [diff] [blame] | 98 | <!-- component is a simple service to verify deactivation when not being used any longer --> |
| 99 | <scr:component name="DelayedServiceComponent" |
| 100 | enabled="false" immediate="false" |
| 101 | configuration-policy="ignore" > |
| 102 | <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" /> |
| 103 | <property name="service.pid" value="ServiceComponent" /> |
| 104 | <service> |
| 105 | <provide interface="java.lang.Object" /> |
| 106 | </service> |
| 107 | </scr:component> |
| 108 | |
Felix Meschberger | f4ae4e4 | 2009-08-21 11:52:16 +0000 | [diff] [blame] | 109 | <!-- Component Factory Instances --> |
| 110 | <scr:component name="factory.component" |
| 111 | enabled="false" |
| 112 | factory="factory.component.factory" > |
| 113 | <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" /> |
| 114 | </scr:component> |
Felix Meschberger | 2e8a24d | 2009-12-14 10:00:12 +0000 | [diff] [blame] | 115 | |
| 116 | <!-- Component Factory Instances, requiring configuration --> |
| 117 | <scr:component name="factory.component.configuration" |
| 118 | enabled="false" |
| 119 | configuration-policy="require" |
| 120 | factory="factory.component.factory.configuration" > |
| 121 | <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" /> |
| 122 | </scr:component> |
Felix Meschberger | 0a9c6b0 | 2012-02-17 13:27:42 +0000 | [diff] [blame] | 123 | |
| 124 | <!-- Component Factory Instances, requiring configuration --> |
| 125 | <scr:component name="factory.component.reference" |
| 126 | enabled="false" |
| 127 | configuration-policy="ignore" |
| 128 | factory="factory.component.factory.reference" > |
| 129 | <implementation class="org.apache.felix.scr.integration.components.SimpleComponent" /> |
| 130 | <reference |
| 131 | name="ref" |
| 132 | interface="org.apache.felix.scr.integration.components.SimpleService" |
| 133 | cardinality="1..n" |
| 134 | policy="static" |
| 135 | bind="bindSimpleService" |
| 136 | unbind="unbindSimpleService" |
| 137 | target="(filterprop=required)" |
| 138 | /> |
| 139 | </scr:component> |
Felix Meschberger | f4ae4e4 | 2009-08-21 11:52:16 +0000 | [diff] [blame] | 140 | |
Felix Meschberger | 8c64e85 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 141 | </components> |