Fix FELIX-2323 : Unbind method are no more called during the invalidation process if this process is not triggered by a service departure
Fix FELIX-2279 : Support post-registration and post-unregistration callbacks (injection of the service reference). Add the processing of @PostRegistration and @PostUnregistration.
Reformat the online-manipulator tests.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@940905 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/tests/core/service-providing/pom.xml b/ipojo/tests/core/service-providing/pom.xml
index 963d7e2..2ded653 100644
--- a/ipojo/tests/core/service-providing/pom.xml
+++ b/ipojo/tests/core/service-providing/pom.xml
@@ -93,9 +93,17 @@
</goals>
<configuration>
<ignoreAnnotations>true</ignoreAnnotations>
+ <ignoreEmbeddedSchemas>true</ignoreEmbeddedSchemas>
</configuration>
</execution>
</executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.ipojo.manipulator</artifactId>
+ <version>1.7.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
diff --git a/ipojo/tests/core/service-providing/src/main/java/org/apache/felix/ipojo/test/scenarios/component/callbacks/CallbacksCheckService.java b/ipojo/tests/core/service-providing/src/main/java/org/apache/felix/ipojo/test/scenarios/component/callbacks/CallbacksCheckService.java
new file mode 100644
index 0000000..56b6b6e
--- /dev/null
+++ b/ipojo/tests/core/service-providing/src/main/java/org/apache/felix/ipojo/test/scenarios/component/callbacks/CallbacksCheckService.java
@@ -0,0 +1,92 @@
+package org.apache.felix.ipojo.test.scenarios.component.callbacks;
+
+import java.util.Properties;
+
+import org.apache.felix.ipojo.test.scenarios.ps.service.CheckService;
+import org.apache.felix.ipojo.test.scenarios.ps.service.FooService;
+import org.osgi.framework.ServiceReference;
+
+public class CallbacksCheckService implements FooService, CheckService {
+
+ // 4 Counters
+ int registered = 0;
+ int unregistered = 0;
+ int registered2 = 0;
+ int unregistered2 = 0;
+
+ // 4 Methods
+ public void registered(ServiceReference ref) {
+ if (ref == null) {
+ throw new IllegalArgumentException("ref null");
+ }
+ registered++;
+ }
+
+ public void unregistered(ServiceReference ref) {
+ if (ref == null) {
+ throw new IllegalArgumentException("ref null");
+ }
+ unregistered++;
+ }
+
+ public void registered2(ServiceReference ref) {
+ if (ref == null) {
+ throw new IllegalArgumentException("ref null");
+ }
+ registered2++;
+ }
+
+ public void unregistered2(ServiceReference ref) {
+ if (ref == null) {
+ throw new IllegalArgumentException("ref null");
+ }
+ unregistered2++;
+ }
+
+ public boolean foo() {
+ return true;
+ }
+
+ public Properties fooProps() {
+ Properties props = new Properties();
+ props.put("registered", new Integer(registered));
+ props.put("registered2", new Integer(registered2));
+ props.put("unregistered", new Integer(unregistered));
+ props.put("unregistered2", new Integer(unregistered2));
+ return props;
+ }
+
+ public boolean getBoolean() {
+ return false;
+ }
+
+ public double getDouble() {
+ return 0;
+ }
+
+ public int getInt() {
+ return 0;
+ }
+
+ public long getLong() {
+ return 0;
+ }
+
+ public Boolean getObject() {
+ return null;
+ }
+
+ public boolean check() {
+ return true;
+ }
+
+ public Properties getProps() {
+ Properties props = new Properties();
+ props.put("registered", new Integer(registered));
+ props.put("registered2", new Integer(registered2));
+ props.put("unregistered", new Integer(unregistered));
+ props.put("unregistered2", new Integer(unregistered2));
+ return props;
+ }
+
+}
diff --git a/ipojo/tests/core/service-providing/src/main/java/org/apache/felix/ipojo/test/scenarios/ps/CallbacksTest.java b/ipojo/tests/core/service-providing/src/main/java/org/apache/felix/ipojo/test/scenarios/ps/CallbacksTest.java
new file mode 100644
index 0000000..d5ef6b9
--- /dev/null
+++ b/ipojo/tests/core/service-providing/src/main/java/org/apache/felix/ipojo/test/scenarios/ps/CallbacksTest.java
@@ -0,0 +1,177 @@
+/*
+ * 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.
+ */
+package org.apache.felix.ipojo.test.scenarios.ps;
+
+import org.apache.felix.ipojo.ComponentInstance;
+import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;
+import org.apache.felix.ipojo.junit4osgi.helpers.IPOJOHelper;
+import org.apache.felix.ipojo.test.scenarios.ps.service.CheckService;
+import org.apache.felix.ipojo.test.scenarios.ps.service.FooService;
+
+public class CallbacksTest extends OSGiTestCase {
+
+ IPOJOHelper helper;
+
+ public void setUp() {
+ helper = new IPOJOHelper(this);
+ }
+
+
+ public void tearDown() {
+ helper.dispose();
+ }
+
+ public void testWithPostRegistrationOnly() {
+ ComponentInstance ci = helper.createComponentInstance("PS-Callbacks-reg-only");
+ // Controller set to true.
+ waitForService(FooService.class.getName(), null, 5000);
+ waitForService(CheckService.class.getName(), null, 5000);
+
+ CheckService check = (CheckService) getServiceObject(CheckService.class.getName(), null);
+ assertNotNull(check);
+
+ Integer reg = (Integer) check.getProps().get("registered");
+ Integer unreg = (Integer) check.getProps().get("unregistered");
+ assertNotNull(reg);
+ assertNotNull(unreg);
+ assertEquals(new Integer(1), reg);
+ assertEquals(new Integer(0), unreg);
+
+ ci.stop();
+
+ reg = (Integer) check.getProps().get("registered");
+ unreg = (Integer) check.getProps().get("unregistered");
+ assertNotNull(reg);
+ assertNotNull(unreg);
+ assertEquals(new Integer(1), reg);
+ assertEquals(new Integer(0), unreg);
+ }
+
+ public void testWithBoth() {
+ ComponentInstance ci = helper.createComponentInstance("PS-Callbacks-both");
+ // Controller set to true.
+ waitForService(FooService.class.getName(), null, 5000);
+ waitForService(CheckService.class.getName(), null, 5000);
+
+ CheckService check = (CheckService) getServiceObject(CheckService.class.getName(), null);
+ assertNotNull(check);
+
+ Integer reg = (Integer) check.getProps().get("registered");
+ Integer unreg = (Integer) check.getProps().get("unregistered");
+ assertNotNull(reg);
+ assertNotNull(unreg);
+ assertEquals(new Integer(1), reg);
+ assertEquals(new Integer(0), unreg);
+
+ ci.stop();
+
+ reg = (Integer) check.getProps().get("registered");
+ unreg = (Integer) check.getProps().get("unregistered");
+ assertNotNull(reg);
+ assertNotNull(unreg);
+ assertEquals(new Integer(1), reg);
+ assertEquals(new Integer(1), unreg);
+ }
+
+ public void testWithPostUnregistrationOnly() {
+ ComponentInstance ci = helper.createComponentInstance("PS-Callbacks-unreg-only");
+ // Controller set to true.
+ waitForService(FooService.class.getName(), null, 5000);
+ waitForService(CheckService.class.getName(), null, 5000);
+
+ CheckService check = (CheckService) getServiceObject(CheckService.class.getName(), null);
+ assertNotNull(check);
+
+ Integer reg = (Integer) check.getProps().get("registered");
+ Integer unreg = (Integer) check.getProps().get("unregistered");
+ assertNotNull(reg);
+ assertNotNull(unreg);
+ assertEquals(new Integer(0), reg);
+ assertEquals(new Integer(0), unreg);
+
+ ci.stop();
+
+ reg = (Integer) check.getProps().get("registered");
+ unreg = (Integer) check.getProps().get("unregistered");
+ assertNotNull(reg);
+ assertNotNull(unreg);
+ assertEquals(new Integer(0), reg);
+ assertEquals(new Integer(1), unreg);
+ }
+
+ public void testWithTwoPairsOfCallbacks() {
+ ComponentInstance ci = helper.createComponentInstance("PS-Callbacks-both-2");
+ // Controller set to true.
+ waitForService(FooService.class.getName(), null, 5000);
+ waitForService(CheckService.class.getName(), null, 5000);
+
+ CheckService check = (CheckService) getServiceObject(CheckService.class.getName(), null);
+ assertNotNull(check);
+
+ Integer reg = (Integer) check.getProps().get("registered");
+ Integer unreg = (Integer) check.getProps().get("unregistered");
+ Integer reg2 = (Integer) check.getProps().get("registered2");
+ Integer unreg2 = (Integer) check.getProps().get("unregistered2");
+ assertNotNull(reg);
+ assertNotNull(unreg);
+ assertNotNull(reg2);
+ assertNotNull(unreg2);
+ assertEquals(new Integer(1), reg);
+ assertEquals(new Integer(0), unreg);
+ assertEquals(new Integer(1), reg2);
+ assertEquals(new Integer(0), unreg2);
+
+ ci.stop();
+
+ reg = (Integer) check.getProps().get("registered");
+ unreg = (Integer) check.getProps().get("unregistered");
+ reg2 = (Integer) check.getProps().get("registered2");
+ unreg2 = (Integer) check.getProps().get("unregistered2");
+ assertNotNull(reg2);
+ assertNotNull(unreg2);
+ assertEquals(new Integer(1), reg);
+ assertEquals(new Integer(1), unreg);
+ assertEquals(new Integer(1), reg2);
+ assertEquals(new Integer(1), unreg2);
+ }
+
+ public void testWithOnePairForTwoService() {
+ ComponentInstance ci = helper.createComponentInstance("PS-Callbacks-both-1");
+ // Controller set to true.
+ waitForService(FooService.class.getName(), null, 5000);
+ waitForService(CheckService.class.getName(), null, 5000);
+
+ CheckService check = (CheckService) getServiceObject(CheckService.class.getName(), null);
+ assertNotNull(check);
+
+ Integer reg = (Integer) check.getProps().get("registered");
+ Integer unreg = (Integer) check.getProps().get("unregistered");
+ assertNotNull(reg);
+ assertNotNull(unreg);
+ assertEquals(new Integer(2), reg);
+ assertEquals(new Integer(0), unreg);
+
+ ci.stop();
+
+ reg = (Integer) check.getProps().get("registered");
+ unreg = (Integer) check.getProps().get("unregistered");
+ assertEquals(new Integer(2), reg);
+ assertEquals(new Integer(2), unreg);
+ }
+}
diff --git a/ipojo/tests/core/service-providing/src/main/java/org/apache/felix/ipojo/test/scenarios/ps/ProvidedServiceTestSuite.java b/ipojo/tests/core/service-providing/src/main/java/org/apache/felix/ipojo/test/scenarios/ps/ProvidedServiceTestSuite.java
index b054e0b..5ba666d 100644
--- a/ipojo/tests/core/service-providing/src/main/java/org/apache/felix/ipojo/test/scenarios/ps/ProvidedServiceTestSuite.java
+++ b/ipojo/tests/core/service-providing/src/main/java/org/apache/felix/ipojo/test/scenarios/ps/ProvidedServiceTestSuite.java
@@ -41,6 +41,7 @@
ots.addTestSuite(NullCheck.class);
ots.addTestSuite(ServiceControllerTest.class);
ots.addTestSuite(PropertiesInAnonymousClassTest.class);
+ ots.addTestSuite(CallbacksTest.class);
return ots;
}
diff --git a/ipojo/tests/core/service-providing/src/main/resources/metadata.xml b/ipojo/tests/core/service-providing/src/main/resources/metadata.xml
index 0fbbbed..9ed6050 100644
--- a/ipojo/tests/core/service-providing/src/main/resources/metadata.xml
+++ b/ipojo/tests/core/service-providing/src/main/resources/metadata.xml
@@ -1,227 +1,263 @@
<ipojo
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="org.apache.felix.ipojo http://felix.apache.org/ipojo/schemas/SNAPSHOT/core.xsd"
- xmlns="org.apache.felix.ipojo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="org.apache.felix.ipojo http://felix.apache.org/ipojo/schemas/SNAPSHOT/core.xsd"
+ xmlns="org.apache.felix.ipojo"
>
- <!-- Simple provider -->
- <component
- classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderType1"
- name="PS-FooProviderType-1" architecture="true">
- <provides />
- </component>
+ <!-- Simple provider -->
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderType1"
+ name="PS-FooProviderType-1" architecture="true">
+ <provides/>
+ </component>
- <component
- classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderType1"
- name="PS-FooProviderType-itf" architecture="true">
- <provides
- specifications="org.apache.felix.ipojo.test.scenarios.ps.service.FooService" />
- </component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderType1"
+ name="PS-FooProviderType-itf" architecture="true">
+ <provides
+ specifications="org.apache.felix.ipojo.test.scenarios.ps.service.FooService"/>
+ </component>
- <component
- classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderType1"
- name="PS-FooProviderType-3" architecture="true">
- <provides>
- <property name="foo" field="m_foo" />
- <property name="bar" field="m_bar" />
- <property name="baz" type="java.lang.String" />
- </provides>
- <properties propagation="true">
- <property name="foo" field="m_foo" />
- <property name="bar" field="m_bar" />
- </properties>
- </component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderType1"
+ name="PS-FooProviderType-3" architecture="true">
+ <provides>
+ <property name="foo" field="m_foo"/>
+ <property name="bar" field="m_bar"/>
+ <property name="baz" type="java.lang.String"/>
+ </provides>
+ <properties propagation="true">
+ <property name="foo" field="m_foo"/>
+ <property name="bar" field="m_bar"/>
+ </properties>
+ </component>
- <!-- Providers providing 2 services -->
- <component
- classname="org.apache.felix.ipojo.test.scenarios.component.FooBarProviderType1"
- name="PS-FooBarProviderType-1" architecture="true">
- <provides />
- </component>
- <component
- classname="org.apache.felix.ipojo.test.scenarios.component.FooBarProviderType1"
- name="PS-FooBarProviderType-2" architecture="true">
- <provides
- specifications="{org.apache.felix.ipojo.test.scenarios.ps.service.FooService, org.apache.felix.ipojo.test.scenarios.ps.service.BarService }" />
- </component>
- <component
- classname="org.apache.felix.ipojo.test.scenarios.component.FooBarProviderType1"
- name="PS-FooBarProviderType-3" architecture="true">
- <provides
- specifications="{org.apache.felix.ipojo.test.scenarios.ps.service.FooService}">
- <property name="baz" type="java.lang.String" value="foo" />
- </provides>
- <provides
- specifications="{org.apache.felix.ipojo.test.scenarios.ps.service.BarService}">
- <property name="baz" type="java.lang.String" value="bar" />
- </provides>
- </component>
+ <!-- Providers providing 2 services -->
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.FooBarProviderType1"
+ name="PS-FooBarProviderType-1" architecture="true">
+ <provides/>
+ </component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.FooBarProviderType1"
+ name="PS-FooBarProviderType-2" architecture="true">
+ <provides
+ specifications="{org.apache.felix.ipojo.test.scenarios.ps.service.FooService, org.apache.felix.ipojo.test.scenarios.ps.service.BarService }"/>
+ </component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.FooBarProviderType1"
+ name="PS-FooBarProviderType-3" architecture="true">
+ <provides
+ specifications="{org.apache.felix.ipojo.test.scenarios.ps.service.FooService}">
+ <property name="baz" type="java.lang.String" value="foo"/>
+ </provides>
+ <provides
+ specifications="{org.apache.felix.ipojo.test.scenarios.ps.service.BarService}">
+ <property name="baz" type="java.lang.String" value="bar"/>
+ </provides>
+ </component>
- <!-- Provider with dynamic property -->
- <component
- classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderTypeDyn"
- name="PS-FooProviderType-Dyn" architecture="true">
- <provides>
- <property name="int" field="intProp" value="2" />
- <property name="boolean" field="boolProp" value="false" />
- <property name="string" field="strProp" value="foo" />
- <property name="strAProp" field="strAProp"
- value="{foo, bar}" />
- <property name="intAProp" field="intAProp" value="{1,2,3}" />
- </provides>
- </component>
+ <!-- Provider with dynamic property -->
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderTypeDyn"
+ name="PS-FooProviderType-Dyn" architecture="true">
+ <provides>
+ <property name="int" field="intProp" value="2"/>
+ <property name="boolean" field="boolProp" value="false"/>
+ <property name="string" field="strProp" value="foo"/>
+ <property name="strAProp" field="strAProp"
+ value="{foo, bar}"/>
+ <property name="intAProp" field="intAProp" value="{1,2,3}"/>
+ </provides>
+ </component>
- <component
- classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderType1"
- name="PS-FooProviderType-2" architecture="true">
- <provides>
- <property name="int" type="int" value="2" />
- <property name="long" type="long" value="40" />
- <property name="string" type="java.lang.String" value="foo" />
- <property name="strAProp" type="java.lang.String[]"
- value="{foo, bar}" />
- <property name="intAProp" type="int[]" value="{1,2,3}" />
- </provides>
- </component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderType1"
+ name="PS-FooProviderType-2" architecture="true">
+ <provides>
+ <property name="int" type="int" value="2"/>
+ <property name="long" type="long" value="40"/>
+ <property name="string" type="java.lang.String" value="foo"/>
+ <property name="strAProp" type="java.lang.String[]"
+ value="{foo, bar}"/>
+ <property name="intAProp" type="int[]" value="{1,2,3}"/>
+ </provides>
+ </component>
- <component
- classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderTypeDyn2"
- name="PS-FooProviderType-Dyn2" architecture="true">
- <provides>
- <property name="int" field="intProp" value="4" />
- <property name="boolean" field="boolProp" />
- <property name="string" field="strProp" />
- <property name="strAProp" field="strAProp" />
- <property name="intAProp" field="intAProp"
- value="{1, 2,3 }" />
- </provides>
- </component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderTypeDyn2"
+ name="PS-FooProviderType-Dyn2" architecture="true">
+ <provides>
+ <property name="int" field="intProp" value="4"/>
+ <property name="boolean" field="boolProp"/>
+ <property name="string" field="strProp"/>
+ <property name="strAProp" field="strAProp"/>
+ <property name="intAProp" field="intAProp"
+ value="{1, 2,3 }"/>
+ </provides>
+ </component>
- <!-- Inherited Provides -->
- <component
- classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation1"
- name="PS-PI1" architecture="true">
- <provides />
- </component>
+ <!-- Inherited Provides -->
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation1"
+ name="PS-PI1" architecture="true">
+ <provides/>
+ </component>
- <component
- classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation1"
- name="PS-PI1-1" architecture="true">
- <provides
- specifications="org.apache.felix.ipojo.test.scenarios.ps.service.ParentParentInterface" />
- </component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation1"
+ name="PS-PI1-1" architecture="true">
+ <provides
+ specifications="org.apache.felix.ipojo.test.scenarios.ps.service.ParentParentInterface"/>
+ </component>
- <component
- classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation1"
- name="PS-PI1-2" architecture="true">
- <provides
- specifications="{org.apache.felix.ipojo.test.scenarios.ps.service.ParentParentInterface, org.apache.felix.ipojo.test.scenarios.ps.service.ParentInterface2}" />
- </component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation1"
+ name="PS-PI1-2" architecture="true">
+ <provides
+ specifications="{org.apache.felix.ipojo.test.scenarios.ps.service.ParentParentInterface, org.apache.felix.ipojo.test.scenarios.ps.service.ParentInterface2}"/>
+ </component>
- <component
- classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation2"
- name="PS-PI2" architecture="true">
- <provides />
- </component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation2"
+ name="PS-PI2" architecture="true">
+ <provides/>
+ </component>
- <component
- classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation2"
- name="PS-PI2-1" architecture="true">
- <provides
- specifications="org.apache.felix.ipojo.test.scenarios.ps.service.ParentParentInterface" />
- </component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation2"
+ name="PS-PI2-1" architecture="true">
+ <provides
+ specifications="org.apache.felix.ipojo.test.scenarios.ps.service.ParentParentInterface"/>
+ </component>
- <component
- classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation3"
- name="PS-PI3" architecture="true">
- <provides />
- </component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation3"
+ name="PS-PI3" architecture="true">
+ <provides/>
+ </component>
- <!-- Concrete and abstract class -->
- <component
- classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessParentImplementation"
- name="PS-PI4" architecture="true">
- <provides specifications="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessParentImplementation"/>
- </component>
- <component
- classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation2"
- name="PS-PI5" architecture="true">
- <provides specifications="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessParentImplementation"/>
- </component>
- <component
- classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation4"
- name="PS-PI6" architecture="true">
- <provides specifications="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessParentImplementation"/>
- </component>
- <component
- classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation3"
- name="PS-PI7" architecture="true">
- <provides specifications="[org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessParentImplementation,
- org.apache.felix.ipojo.test.scenarios.ps.service.FooService]"/>
- </component>
+ <!-- Concrete and abstract class -->
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessParentImplementation"
+ name="PS-PI4" architecture="true">
+ <provides specifications="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessParentImplementation"/>
+ </component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation2"
+ name="PS-PI5" architecture="true">
+ <provides specifications="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessParentImplementation"/>
+ </component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation4"
+ name="PS-PI6" architecture="true">
+ <provides specifications="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessParentImplementation"/>
+ </component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation3"
+ name="PS-PI7" architecture="true">
+ <provides specifications="[org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessParentImplementation, org.apache.felix.ipojo.test.scenarios.ps.service.FooService]"/>
+ </component>
- <!-- Null Check -->
- <component classname="org.apache.felix.ipojo.test.scenarios.component.NullCheckServiceProvider" immediate="true"
- name="PS-Null">
- <provides>
- <property field="prop1"/>
- <property field="prop2"/>
- </provides>
- </component>
+ <!-- Null Check -->
+ <component classname="org.apache.felix.ipojo.test.scenarios.component.NullCheckServiceProvider" immediate="true"
+ name="PS-Null">
+ <provides>
+ <property field="prop1"/>
+ <property field="prop2"/>
+ </provides>
+ </component>
- <!-- Service Controller -->
- <component classname="org.apache.felix.ipojo.test.scenarios.component.controller.ControllerCheckService"
- name="PS-Controller-1-default">
- <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.FooService">
- <controller field="controller"/>
- </provides>
- <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.CheckService">
- </provides>
- </component>
+ <!-- Service Controller -->
<component classname="org.apache.felix.ipojo.test.scenarios.component.controller.ControllerCheckService"
- name="PS-Controller-1-false">
- <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.FooService">
- <property name="test2" type="string" value="test2"/>
- <controller field="controller" value="false"/>
- <property name="test" type="string" value="test"/>
- </provides>
- <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.CheckService">
- </provides>
- </component>
- <component classname="org.apache.felix.ipojo.test.scenarios.component.controller.DoubleControllerCheckService"
- name="PS-Controller-2-truetrue">
- <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.FooService">
- <property name="test2" type="string" value="test2"/>
- <controller field="controllerFoo" value="true"/>
- <property name="test" type="string" value="test"/>
- </provides>
- <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.CheckService">
- <controller field="controllerCS" value="true"/>
- </provides>
- </component>
- <component classname="org.apache.felix.ipojo.test.scenarios.component.controller.DoubleControllerCheckService"
- name="PS-Controller-2-truefalse">
- <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.FooService">
- <property name="test2" type="string" value="test2"/>
- <controller field="controllerFoo" value="false"/>
- <property name="test" type="string" value="test"/>
- </provides>
- <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.CheckService">
- <controller field="controllerCS" value="true"/>
- </provides>
- </component>
+ name="PS-Controller-1-default">
+ <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.FooService">
+ <controller field="controller"/>
+ </provides>
+ <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.CheckService">
+ </provides>
+ </component>
+ <component classname="org.apache.felix.ipojo.test.scenarios.component.controller.ControllerCheckService"
+ name="PS-Controller-1-false">
+ <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.FooService">
+ <property name="test2" type="string" value="test2"/>
+ <controller field="controller" value="false"/>
+ <property name="test" type="string" value="test"/>
+ </provides>
+ <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.CheckService">
+ </provides>
+ </component>
+ <component classname="org.apache.felix.ipojo.test.scenarios.component.controller.DoubleControllerCheckService"
+ name="PS-Controller-2-truetrue">
+ <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.FooService">
+ <property name="test2" type="string" value="test2"/>
+ <controller field="controllerFoo" value="true"/>
+ <property name="test" type="string" value="test"/>
+ </provides>
+ <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.CheckService">
+ <controller field="controllerCS" value="true"/>
+ </provides>
+ </component>
+ <component classname="org.apache.felix.ipojo.test.scenarios.component.controller.DoubleControllerCheckService"
+ name="PS-Controller-2-truefalse">
+ <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.FooService">
+ <property name="test2" type="string" value="test2"/>
+ <controller field="controllerFoo" value="false"/>
+ <property name="test" type="string" value="test"/>
+ </provides>
+ <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.CheckService">
+ <controller field="controllerCS" value="true"/>
+ </provides>
+ </component>
- <!-- Anonymous classes -->
- <component
- classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderWithAnonymousClass"
- name="PS-FooProviderTypeAnonymous-Dyn" architecture="true">
- <provides>
- <property name="int" field="intProp" value="2" />
- <property name="boolean" field="boolProp" value="false" />
- <property name="string" field="strProp" value="foo" />
- <property name="strAProp" field="strAProp"
- value="{foo, bar}" />
- <property name="intAProp" field="intAProp" value="{1,2,3}" />
- </provides>
- </component>
+ <!-- Anonymous classes -->
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderWithAnonymousClass"
+ name="PS-FooProviderTypeAnonymous-Dyn" architecture="true">
+ <provides>
+ <property name="int" field="intProp" value="2"/>
+ <property name="boolean" field="boolProp" value="false"/>
+ <property name="string" field="strProp" value="foo"/>
+ <property name="strAProp" field="strAProp"
+ value="{foo, bar}"/>
+ <property name="intAProp" field="intAProp" value="{1,2,3}"/>
+ </provides>
+ </component>
+
+ <!-- Registration callbacks -->
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.callbacks.CallbacksCheckService"
+ name="PS-Callbacks-reg-only">
+ <provides post-registration="registered"/>
+ </component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.callbacks.CallbacksCheckService"
+ name="PS-Callbacks-both">
+ <provides post-registration="registered" post-unregistration="unregistered"/>
+ </component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.callbacks.CallbacksCheckService"
+ name="PS-Callbacks-unreg-only">
+ <provides post-unregistration="unregistered"/>
+ </component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.callbacks.CallbacksCheckService"
+ name="PS-Callbacks-both-2">
+ <provides
+ specifications="org.apache.felix.ipojo.test.scenarios.ps.service.FooService"
+ post-unregistration="unregistered" post-registration="registered"/>
+ <provides
+ specifications="org.apache.felix.ipojo.test.scenarios.ps.service.CheckService"
+ post-unregistration="unregistered2" post-registration="registered2"/>
+ </component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.callbacks.CallbacksCheckService"
+ name="PS-Callbacks-both-1">
+ <provides
+ specifications="org.apache.felix.ipojo.test.scenarios.ps.service.FooService"
+ post-unregistration="unregistered" post-registration="registered"/>
+ <provides
+ specifications="org.apache.felix.ipojo.test.scenarios.ps.service.CheckService"
+ post-unregistration="unregistered" post-registration="registered"/>
+ </component>
</ipojo>