Felix Meschberger | 40a2677 | 2009-10-06 14:13:14 +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 | <!-- |
| 23 | Components used for the ComponentActivationTest integration test. |
| 24 | This tests components with and without activate/deactivate method |
| 25 | configured and with and without activate/deactivate methods present |
| 26 | --> |
| 27 | |
| 28 | <!-- no declaration of activate/deactivate methods --> |
| 29 | <scr:component name="ActivatorComponent.no.decl" |
| 30 | enabled="false"> |
| 31 | <implementation class="org.apache.felix.scr.integration.components.ActivatorComponent" /> |
| 32 | </scr:component> |
| 33 | |
| 34 | <!-- wrong declaration of activate method --> |
| 35 | <scr:component name="ActivatorComponent.activate.missing" |
| 36 | enabled="false" |
| 37 | activate="nonExistingActivate"> |
| 38 | <implementation class="org.apache.felix.scr.integration.components.ActivatorComponent" /> |
| 39 | </scr:component> |
| 40 | |
| 41 | <!-- wrong declaration of deactivate method --> |
| 42 | <scr:component name="ActivatorComponent.deactivate.missing" |
| 43 | enabled="false" |
| 44 | deactivate="nonExistingDeactivate"> |
| 45 | <implementation class="org.apache.felix.scr.integration.components.ActivatorComponent" /> |
| 46 | </scr:component> |
| 47 | |
| 48 | <!-- correct declaration of activate and deactivate method --> |
| 49 | <scr:component name="ActivatorComponent.decl" |
| 50 | enabled="false" |
| 51 | activate="myActivate" |
| 52 | deactivate="myDeactivate"> |
| 53 | <implementation class="org.apache.felix.scr.integration.components.ActivatorComponent" /> |
| 54 | </scr:component> |
| 55 | |
| 56 | <!-- correct declaration of activate and deactivate method, activate failure --> |
| 57 | <scr:component name="ActivatorComponent.activate.fail" |
| 58 | enabled="false" |
| 59 | activate="myActivate" |
| 60 | deactivate="myDeactivate"> |
| 61 | <implementation class="org.apache.felix.scr.integration.components.ActivatorComponent" /> |
| 62 | <property name="failActivate" value="true" /> |
| 63 | </scr:component> |
| 64 | |
| 65 | <!-- correct declaration of activate and deactivate method, deactivate failure --> |
| 66 | <scr:component name="ActivatorComponent.deactivate.fail" |
| 67 | enabled="false" |
| 68 | activate="myActivate" |
| 69 | deactivate="myDeactivate"> |
| 70 | <implementation class="org.apache.felix.scr.integration.components.ActivatorComponent" /> |
| 71 | <property name="failDeactivate" value="true" /> |
| 72 | </scr:component> |
Felix Meschberger | 89a24c9 | 2012-11-13 23:40:56 +0000 | [diff] [blame] | 73 | |
| 74 | <!-- bind service during activate --> |
| 75 | <scr:component name="ActivatorComponent.activate.with.bind" |
| 76 | enabled="false" |
| 77 | activate="myActivate" |
| 78 | deactivate="myDeactivate"> |
| 79 | <implementation class="org.apache.felix.scr.integration.components.ActivatorComponent" /> |
| 80 | <property name="registerService" value="true" /> |
| 81 | <reference |
| 82 | name="service" |
| 83 | interface="org.apache.felix.scr.integration.components.SimpleService" |
| 84 | bind="bindSimpleService" |
| 85 | unbind="unbindSimpleService" |
| 86 | policy="dynamic" |
| 87 | cardinality="0..n" |
| 88 | /> |
| 89 | </scr:component> |
Felix Meschberger | f56535b | 2012-11-15 14:57:46 +0000 | [diff] [blame] | 90 | |
| 91 | <!-- bind service during activate --> |
| 92 | <scr:component name="ActivatorComponent.activate.delayed.with.bind" |
| 93 | enabled="false" |
| 94 | activate="myActivate" |
| 95 | deactivate="myDeactivate"> |
| 96 | <implementation class="org.apache.felix.scr.integration.components.ActivatorComponent" /> |
| 97 | <service factory="false"> |
| 98 | <provide interface="org.apache.felix.scr.integration.components.ActivatorComponent"/> |
| 99 | </service> |
| 100 | <property name="registerService" value="true" /> |
| 101 | <reference |
| 102 | name="service" |
| 103 | interface="org.apache.felix.scr.integration.components.SimpleService" |
| 104 | bind="bindSimpleService" |
| 105 | unbind="unbindSimpleService" |
| 106 | policy="dynamic" |
| 107 | cardinality="0..n" |
| 108 | /> |
| 109 | </scr:component> |
| 110 | |
| 111 | <!-- bind service during activate --> |
| 112 | <scr:component name="ActivatorComponent.activate.service.factory.with.bind" |
| 113 | enabled="false" |
| 114 | activate="myActivate" |
| 115 | deactivate="myDeactivate"> |
| 116 | <implementation class="org.apache.felix.scr.integration.components.ActivatorComponent" /> |
| 117 | <service factory="true"> |
| 118 | <provide interface="org.apache.felix.scr.integration.components.ActivatorComponent"/> |
| 119 | </service> |
| 120 | <property name="registerService" value="true" /> |
| 121 | <reference |
| 122 | name="service" |
| 123 | interface="org.apache.felix.scr.integration.components.SimpleService" |
| 124 | bind="bindSimpleService" |
| 125 | unbind="unbindSimpleService" |
| 126 | policy="dynamic" |
| 127 | cardinality="0..n" |
| 128 | /> |
| 129 | </scr:component> |
Felix Meschberger | 40a2677 | 2009-10-06 14:13:14 +0000 | [diff] [blame] | 130 | </components> |