You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cl...@apache.org on 2008/11/03 14:28:13 UTC
svn commit: r710054 [3/3] - in /felix/trunk/ipojo:
core/src/main/java/org/apache/felix/ipojo/handlers/dependency/
tests/core/service-dependency/src/main/java/org/apache/felix/ipojo/test/scenarios/component/
tests/core/service-dependency/src/main/java/o...
Modified: felix/trunk/ipojo/tests/core/service-dependency/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/OptionalNoNullableDependencies.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/service-dependency/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/OptionalNoNullableDependencies.java?rev=710054&r1=710053&r2=710054&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/core/service-dependency/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/OptionalNoNullableDependencies.java (original)
+++ felix/trunk/ipojo/tests/core/service-dependency/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/OptionalNoNullableDependencies.java Mon Nov 3 05:28:13 2008
@@ -31,7 +31,7 @@
public class OptionalNoNullableDependencies extends OSGiTestCase {
- ComponentInstance instance1, instance2, instance3, instance4, instance5;
+ ComponentInstance instance1, instance2, instance3, instance4, instance5, instance6, instance7;
ComponentInstance fooProvider;
public void setUp() {
@@ -60,6 +60,14 @@
Properties i5 = new Properties();
i5.put("instance.name","Both");
instance5 = Utils.getFactoryByName(context, "BothOptionalNoNullableCheckServiceProvider").createComponentInstance(i5);
+
+ Properties i6 = new Properties();
+ i6.put("instance.name","Map");
+ instance6 = Utils.getFactoryByName(context, "MapOptionalNoNullableCheckServiceProvider").createComponentInstance(i6);
+
+ Properties i7 = new Properties();
+ i7.put("instance.name","Dictionary");
+ instance7 = Utils.getFactoryByName(context, "DictOptionalNoNullableCheckServiceProvider").createComponentInstance(i7);
} catch(Exception e) {
e.getMessage();
fail(e.getMessage());
@@ -72,12 +80,16 @@
instance3.dispose();
instance4.dispose();
instance5.dispose();
+ instance6.dispose();
+ instance7.dispose();
fooProvider.dispose();
instance1 = null;
instance2 = null;
instance3 = null;
instance4 = null;
instance5 = null;
+ instance6 = null;
+ instance7 = null;
fooProvider = null;
}
@@ -376,6 +388,154 @@
context.ungetService(arch_ref);
context.ungetService(cs_ref);
}
+
+ public void testDict() {
+ ServiceReference arch_ref = Utils.getServiceReferenceByName(context, Architecture.class.getName(), instance7.getInstanceName());
+ assertNotNull("Check architecture availability", arch_ref);
+ InstanceDescription id = ((Architecture) context.getService(arch_ref)).getInstanceDescription();
+ assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
+
+ ServiceReference cs_ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance7.getInstanceName());
+ assertNotNull("Check CheckService availability", cs_ref);
+ CheckService cs = (CheckService) context.getService(cs_ref);
+ Properties props = cs.getProps();
+ //Check properties
+ assertNull("check CheckService invocation -1", props.get("result")); // Null, no provider
+ assertEquals("check void bind invocation -1", ((Integer)props.get("voidB")).intValue(), 0);
+ assertEquals("check void unbind callback invocation -1", ((Integer)props.get("voidU")).intValue(), 0);
+ assertEquals("check object bind callback invocation -1", ((Integer)props.get("objectB")).intValue(), 0);
+ assertEquals("check object unbind callback invocation -1", ((Integer)props.get("objectU")).intValue(), 0);
+ assertEquals("check both bind callback invocation -1", ((Integer)props.get("bothB")).intValue(), 0);
+ assertEquals("check both unbind callback invocation -1", ((Integer)props.get("bothU")).intValue(), 0);
+ assertEquals("check map bind callback invocation -1", ((Integer)props.get("mapB")).intValue(), 0);
+ assertEquals("check map unbind callback invocation -1", ((Integer)props.get("mapU")).intValue(), 0);
+ assertEquals("check dict bind callback invocation -1", ((Integer)props.get("dictB")).intValue(), 0);
+ assertEquals("check dict unbind callback invocation -1", ((Integer)props.get("dictU")).intValue(), 0);
+
+ fooProvider.start();
+
+ id = ((Architecture) context.getService(arch_ref)).getInstanceDescription();
+ assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
+
+ assertNotNull("Check CheckService availability", cs_ref);
+ cs = (CheckService) context.getService(cs_ref);
+ props = cs.getProps();
+ //Check properties
+ assertTrue("check CheckService invocation -2", ((Boolean)props.get("result")).booleanValue());
+ assertEquals("check void bind invocation -2", ((Integer)props.get("voidB")).intValue(), 0);
+ assertEquals("check void unbind callback invocation -2", ((Integer)props.get("voidU")).intValue(), 0);
+ assertEquals("check object bind callback invocation -2", ((Integer)props.get("objectB")).intValue(), 0);
+ assertEquals("check object unbind callback invocation -2", ((Integer)props.get("objectU")).intValue(), 0);
+ assertEquals("check ref bind callback invocation -2", ((Integer)props.get("refB")).intValue(), 0);
+ assertEquals("check ref unbind callback invocation -2", ((Integer)props.get("refU")).intValue(), 0);
+ assertEquals("check both bind callback invocation -2", ((Integer)props.get("bothB")).intValue(), 0);
+ assertEquals("check both unbind callback invocation -2", ((Integer)props.get("bothU")).intValue(), 0);
+ assertEquals("check map bind callback invocation -2", ((Integer)props.get("mapB")).intValue(), 0);
+ assertEquals("check map unbind callback invocation -2", ((Integer)props.get("mapU")).intValue(), 0);
+ assertEquals("check dict bind callback invocation -2", ((Integer)props.get("dictB")).intValue(), 1);
+ assertEquals("check dict unbind callback invocation -2", ((Integer)props.get("dictU")).intValue(), 0);
+
+ fooProvider.stop();
+
+ id = ((Architecture) context.getService(arch_ref)).getInstanceDescription();
+ assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
+
+ cs = (CheckService) context.getService(cs_ref);
+ props = cs.getProps();
+ //Check properties
+ assertNull("check CheckService invocation -3", props.get("result")); // Null, no provider
+ assertEquals("check void bind invocation -3", ((Integer)props.get("voidB")).intValue(), 0);
+ assertEquals("check void unbind callback invocation -3", ((Integer)props.get("voidU")).intValue(), 0);
+ assertEquals("check object bind callback invocation -3", ((Integer)props.get("objectB")).intValue(), 0);
+ assertEquals("check object unbind callback invocation -3", ((Integer)props.get("objectU")).intValue(), 0);
+ assertEquals("check ref bind callback invocation -3", ((Integer)props.get("refB")).intValue(), 0);
+ assertEquals("check ref unbind callback invocation -3", ((Integer)props.get("refU")).intValue(), 0);
+ assertEquals("check both bind callback invocation -3", ((Integer)props.get("bothB")).intValue(), 0);
+ assertEquals("check both unbind callback invocation -3", ((Integer)props.get("bothU")).intValue(), 0);
+ assertEquals("check map bind callback invocation -3", ((Integer)props.get("mapB")).intValue(), 0);
+ assertEquals("check map unbind callback invocation -3", ((Integer)props.get("mapU")).intValue(), 0);
+ assertEquals("check dict bind callback invocation -3", ((Integer)props.get("dictB")).intValue(), 1);
+ assertEquals("check dict unbind callback invocation -3", ((Integer)props.get("dictU")).intValue(), 1);
+
+ id = null;
+ cs = null;
+ context.ungetService(arch_ref);
+ context.ungetService(cs_ref);
+ }
+
+ public void testMap() {
+ ServiceReference arch_ref = Utils.getServiceReferenceByName(context, Architecture.class.getName(), instance6.getInstanceName());
+ assertNotNull("Check architecture availability", arch_ref);
+ InstanceDescription id = ((Architecture) context.getService(arch_ref)).getInstanceDescription();
+ assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
+
+ ServiceReference cs_ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance6.getInstanceName());
+ assertNotNull("Check CheckService availability", cs_ref);
+ CheckService cs = (CheckService) context.getService(cs_ref);
+ Properties props = cs.getProps();
+ //Check properties
+ assertNull("check CheckService invocation -1", props.get("result")); // Null, no provider
+ assertEquals("check void bind invocation -1", ((Integer)props.get("voidB")).intValue(), 0);
+ assertEquals("check void unbind callback invocation -1", ((Integer)props.get("voidU")).intValue(), 0);
+ assertEquals("check object bind callback invocation -1", ((Integer)props.get("objectB")).intValue(), 0);
+ assertEquals("check object unbind callback invocation -1", ((Integer)props.get("objectU")).intValue(), 0);
+ assertEquals("check both bind callback invocation -1", ((Integer)props.get("bothB")).intValue(), 0);
+ assertEquals("check both unbind callback invocation -1", ((Integer)props.get("bothU")).intValue(), 0);
+ assertEquals("check map bind callback invocation -1", ((Integer)props.get("mapB")).intValue(), 0);
+ assertEquals("check map unbind callback invocation -1", ((Integer)props.get("mapU")).intValue(), 0);
+ assertEquals("check dict bind callback invocation -1", ((Integer)props.get("dictB")).intValue(), 0);
+ assertEquals("check dict unbind callback invocation -1", ((Integer)props.get("dictU")).intValue(), 0);
+
+ fooProvider.start();
+
+ id = ((Architecture) context.getService(arch_ref)).getInstanceDescription();
+ assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
+
+ assertNotNull("Check CheckService availability", cs_ref);
+ cs = (CheckService) context.getService(cs_ref);
+ props = cs.getProps();
+ //Check properties
+ assertTrue("check CheckService invocation -2", ((Boolean)props.get("result")).booleanValue());
+ assertEquals("check void bind invocation -2", ((Integer)props.get("voidB")).intValue(), 0);
+ assertEquals("check void unbind callback invocation -2", ((Integer)props.get("voidU")).intValue(), 0);
+ assertEquals("check object bind callback invocation -2", ((Integer)props.get("objectB")).intValue(), 0);
+ assertEquals("check object unbind callback invocation -2", ((Integer)props.get("objectU")).intValue(), 0);
+ assertEquals("check ref bind callback invocation -2", ((Integer)props.get("refB")).intValue(), 0);
+ assertEquals("check ref unbind callback invocation -2", ((Integer)props.get("refU")).intValue(), 0);
+ assertEquals("check both bind callback invocation -2", ((Integer)props.get("bothB")).intValue(), 0);
+ assertEquals("check both unbind callback invocation -2", ((Integer)props.get("bothU")).intValue(), 0);
+ assertEquals("check map bind callback invocation -2", ((Integer)props.get("mapB")).intValue(), 1);
+ assertEquals("check map unbind callback invocation -2", ((Integer)props.get("mapU")).intValue(), 0);
+ assertEquals("check dict bind callback invocation -2", ((Integer)props.get("dictB")).intValue(), 0);
+ assertEquals("check dict unbind callback invocation -2", ((Integer)props.get("dictU")).intValue(), 0);
+
+ fooProvider.stop();
+
+ id = ((Architecture) context.getService(arch_ref)).getInstanceDescription();
+ assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
+
+ cs = (CheckService) context.getService(cs_ref);
+ props = cs.getProps();
+ //Check properties
+ assertNull("check CheckService invocation -3", props.get("result")); // Null, no provider
+ assertEquals("check void bind invocation -3", ((Integer)props.get("voidB")).intValue(), 0);
+ assertEquals("check void unbind callback invocation -3", ((Integer)props.get("voidU")).intValue(), 0);
+ assertEquals("check object bind callback invocation -3", ((Integer)props.get("objectB")).intValue(), 0);
+ assertEquals("check object unbind callback invocation -3", ((Integer)props.get("objectU")).intValue(), 0);
+ assertEquals("check ref bind callback invocation -3", ((Integer)props.get("refB")).intValue(), 0);
+ assertEquals("check ref unbind callback invocation -3", ((Integer)props.get("refU")).intValue(), 0);
+ assertEquals("check both bind callback invocation -3", ((Integer)props.get("bothB")).intValue(), 0);
+ assertEquals("check both unbind callback invocation -3", ((Integer)props.get("bothU")).intValue(), 0);
+ assertEquals("check map bind callback invocation -3", ((Integer)props.get("mapB")).intValue(), 1);
+ assertEquals("check map unbind callback invocation -3", ((Integer)props.get("mapU")).intValue(), 1);
+ assertEquals("check dict bind callback invocation -3", ((Integer)props.get("dictB")).intValue(), 0);
+ assertEquals("check dict unbind callback invocation -3", ((Integer)props.get("dictU")).intValue(), 0);
+
+ id = null;
+ cs = null;
+ context.ungetService(arch_ref);
+ context.ungetService(cs_ref);
+ }
}
Modified: felix/trunk/ipojo/tests/core/service-dependency/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/SimpleDependencies.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/service-dependency/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/SimpleDependencies.java?rev=710054&r1=710053&r2=710054&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/core/service-dependency/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/SimpleDependencies.java (original)
+++ felix/trunk/ipojo/tests/core/service-dependency/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/SimpleDependencies.java Mon Nov 3 05:28:13 2008
@@ -31,7 +31,7 @@
public class SimpleDependencies extends OSGiTestCase {
- ComponentInstance instance1, instance2, instance3, instance4, instance5, instance6;
+ ComponentInstance instance1, instance2, instance3, instance4, instance5, instance6, instance7, instance8;
ComponentInstance fooProvider;
public void setUp() {
@@ -64,6 +64,14 @@
Properties i6 = new Properties();
i6.put("instance.name","Double");
instance6 = Utils.getFactoryByName(context, "DoubleCheckServiceProvider").createComponentInstance(i6);
+
+ Properties i7 = new Properties();
+ i7.put("instance.name","Map");
+ instance7 = Utils.getFactoryByName(context, "MapCheckServiceProvider").createComponentInstance(i7);
+
+ Properties i8 = new Properties();
+ i8.put("instance.name","Dictionary");
+ instance8 = Utils.getFactoryByName(context, "DictCheckServiceProvider").createComponentInstance(i8);
} catch(Exception e) {
e.printStackTrace();
fail(e.getMessage()); }
@@ -77,6 +85,8 @@
instance4.dispose();
instance5.dispose();
instance6.dispose();
+ instance7.dispose();
+ instance8.dispose();
fooProvider.dispose();
instance1 = null;
instance2 = null;
@@ -84,6 +94,8 @@
instance4 = null;
instance5 = null;
instance6 = null;
+ instance7 = null;
+ instance8 = null;
fooProvider = null;
}
@@ -316,5 +328,87 @@
context.ungetService(arch_ref);
context.ungetService(cs_ref);
}
+
+ public void testMap() {
+ ServiceReference arch_ref = Utils.getServiceReferenceByName(context, Architecture.class.getName(), instance7.getInstanceName());
+ assertNotNull("Check architecture availability", arch_ref);
+ InstanceDescription id = ((Architecture) context.getService(arch_ref)).getInstanceDescription();
+ assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
+
+ fooProvider.start();
+
+ id = ((Architecture) context.getService(arch_ref)).getInstanceDescription();
+ assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
+
+ ServiceReference cs_ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance7.getInstanceName());
+ assertNotNull("Check CheckService availability", cs_ref);
+ CheckService cs = (CheckService) context.getService(cs_ref);
+ Properties props = cs.getProps();
+ //Check properties
+ assertTrue("check CheckService invocation -1", ((Boolean)props.get("result")).booleanValue());
+ assertEquals("check void bind invocation -1", ((Integer)props.get("voidB")).intValue(), 0);
+ assertEquals("check void unbind callback invocation -1", ((Integer)props.get("voidU")).intValue(), 0);
+ assertEquals("check object bind callback invocation -1", ((Integer)props.get("objectB")).intValue(), 0);
+ assertEquals("check object unbind callback invocation -1", ((Integer)props.get("objectU")).intValue(), 0);
+ assertEquals("check ref bind callback invocation -1", ((Integer)props.get("refB")).intValue(), 0);
+ assertEquals("check ref unbind callback invocation -1", ((Integer)props.get("refU")).intValue(), 0);
+ assertEquals("check both bind callback invocation -1", ((Integer)props.get("bothB")).intValue(), 0);
+ assertEquals("check both unbind callback invocation -1", ((Integer)props.get("bothU")).intValue(), 0);
+ assertEquals("check map bind callback invocation -1", ((Integer)props.get("mapB")).intValue(), 1);
+ assertEquals("check map unbind callback invocation -1", ((Integer)props.get("mapU")).intValue(), 0);
+ assertEquals("check dict bind callback invocation -1", ((Integer)props.get("dictB")).intValue(), 0);
+ assertEquals("check dict unbind callback invocation -1", ((Integer)props.get("dictU")).intValue(), 0);
+
+ fooProvider.stop();
+
+ id = ((Architecture) context.getService(arch_ref)).getInstanceDescription();
+ assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
+
+ id = null;
+ cs = null;
+ context.ungetService(arch_ref);
+ context.ungetService(cs_ref);
+ }
+
+ public void testDict() {
+ ServiceReference arch_ref = Utils.getServiceReferenceByName(context, Architecture.class.getName(), instance8.getInstanceName());
+ assertNotNull("Check architecture availability", arch_ref);
+ InstanceDescription id = ((Architecture) context.getService(arch_ref)).getInstanceDescription();
+ assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
+
+ fooProvider.start();
+
+ id = ((Architecture) context.getService(arch_ref)).getInstanceDescription();
+ assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
+
+ ServiceReference cs_ref = Utils.getServiceReferenceByName(context, CheckService.class.getName(), instance8.getInstanceName());
+ assertNotNull("Check CheckService availability", cs_ref);
+ CheckService cs = (CheckService) context.getService(cs_ref);
+ Properties props = cs.getProps();
+ //Check properties
+ assertTrue("check CheckService invocation -1", ((Boolean)props.get("result")).booleanValue());
+ assertEquals("check void bind invocation -1", ((Integer)props.get("voidB")).intValue(), 0);
+ assertEquals("check void unbind callback invocation -1", ((Integer)props.get("voidU")).intValue(), 0);
+ assertEquals("check object bind callback invocation -1", ((Integer)props.get("objectB")).intValue(), 0);
+ assertEquals("check object unbind callback invocation -1", ((Integer)props.get("objectU")).intValue(), 0);
+ assertEquals("check ref bind callback invocation -1", ((Integer)props.get("refB")).intValue(), 0);
+ assertEquals("check ref unbind callback invocation -1", ((Integer)props.get("refU")).intValue(), 0);
+ assertEquals("check both bind callback invocation -1", ((Integer)props.get("bothB")).intValue(), 0);
+ assertEquals("check both unbind callback invocation -1", ((Integer)props.get("bothU")).intValue(), 0);
+ assertEquals("check map bind callback invocation -1", ((Integer)props.get("mapB")).intValue(), 0);
+ assertEquals("check map unbind callback invocation -1", ((Integer)props.get("mapU")).intValue(), 0);
+ assertEquals("check dict bind callback invocation -1", ((Integer)props.get("dictB")).intValue(), 1);
+ assertEquals("check dict unbind callback invocation -1", ((Integer)props.get("dictU")).intValue(), 0);
+
+ fooProvider.stop();
+
+ id = ((Architecture) context.getService(arch_ref)).getInstanceDescription();
+ assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
+
+ id = null;
+ cs = null;
+ context.ungetService(arch_ref);
+ context.ungetService(cs_ref);
+ }
}
Modified: felix/trunk/ipojo/tests/core/service-dependency/src/main/resources/metadata.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/service-dependency/src/main/resources/metadata.xml?rev=710054&r1=710053&r2=710054&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/core/service-dependency/src/main/resources/metadata.xml (original)
+++ felix/trunk/ipojo/tests/core/service-dependency/src/main/resources/metadata.xml Mon Nov 3 05:28:13 2008
@@ -50,6 +50,25 @@
</requires>
<provides />
</component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.CheckServiceProvider"
+ name="MapCheckServiceProvider" architecture="true">
+ <requires field="fs">
+ <callback type="bind" method="propertiesMapBind" />
+ <callback type="unbind" method="propertiesMapUnbind" />
+ </requires>
+ <provides />
+ </component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.CheckServiceProvider"
+ name="DictCheckServiceProvider" architecture="true">
+ <requires field="fs">
+ <callback type="bind" method="propertiesDictionaryBind" />
+ <callback type="unbind" method="propertiesDictionaryUnbind" />
+ </requires>
+ <provides />
+ </component>
+
<component
classname="org.apache.felix.ipojo.test.scenarios.component.CheckServiceProvider"
name="DoubleCheckServiceProvider" architecture="true">
@@ -89,12 +108,30 @@
</requires>
<provides />
</component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.MethodCheckServiceProvider"
+ name="MMapCheckServiceProvider" architecture="true">
+ <requires>
+ <callback type="bind" method="propertiesMapBind" />
+ <callback type="unbind" method="propertiesMapUnbind" />
+ </requires>
+ <provides />
+ </component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.MethodCheckServiceProvider"
+ name="MDictCheckServiceProvider" architecture="true">
+ <requires>
+ <callback type="bind" method="propertiesDictionaryBind" />
+ <callback type="unbind" method="propertiesDictionaryUnbind" />
+ </requires>
+ <provides />
+ </component>
<!-- Simple & Optional Dependencies -->
<component
classname="org.apache.felix.ipojo.test.scenarios.component.CheckServiceProvider"
name="SimpleOptionalCheckServiceProvider" architecture="true">
- <requires field="fs" optional="true" />
+ <requires field="fs" optional="true" id="FooService"/>
<provides />
</component>
<component
@@ -168,6 +205,25 @@
</component>
<component
classname="org.apache.felix.ipojo.test.scenarios.component.CheckServiceProvider"
+ name="MapOptionalCheckServiceProvider" architecture="true">
+ <requires field="fs" optional="true">
+ <callback type="bind" method="propertiesMapBind" />
+ <callback type="unbind" method="propertiesMapUnbind" />
+ </requires>
+ <provides />
+ </component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.CheckServiceProvider"
+ name="DictOptionalCheckServiceProvider" architecture="true">
+ <requires field="fs" optional="true">
+ <callback type="bind" method="propertiesDictionaryBind" />
+ <callback type="unbind" method="propertiesDictionaryUnbind" />
+ </requires>
+ <provides />
+ </component>
+
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.CheckServiceProvider"
name="BothOptionalNoNullableCheckServiceProvider" architecture="true">
<requires field="fs" optional="true" nullable="false">
<callback type="bind" method="bothBind" />
@@ -175,6 +231,24 @@
</requires>
<provides />
</component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.CheckServiceProvider"
+ name="MapOptionalNoNullableCheckServiceProvider" architecture="true">
+ <requires field="fs" optional="true" nullable="false">
+ <callback type="bind" method="propertiesMapBind" />
+ <callback type="unbind" method="propertiesMapUnbind" />
+ </requires>
+ <provides />
+ </component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.CheckServiceProvider"
+ name="DictOptionalNoNullableCheckServiceProvider" architecture="true">
+ <requires field="fs" optional="true" nullable="false">
+ <callback type="bind" method="propertiesDictionaryBind" />
+ <callback type="unbind" method="propertiesDictionaryUnbind" />
+ </requires>
+ <provides />
+ </component>
<component
classname="org.apache.felix.ipojo.test.scenarios.component.MethodCheckServiceProvider"
@@ -207,6 +281,29 @@
</requires>
<provides />
</component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.MethodCheckServiceProvider"
+ name="MMapOptionalCheckServiceProvider" architecture="true">
+ <requires
+ specification="org.apache.felix.ipojo.test.scenarios.service.dependency.service.FooService"
+ optional="true">
+ <callback type="bind" method="propertiesMapBind" />
+ <callback type="unbind" method="propertiesMapUnbind" />
+ </requires>
+ <provides />
+ </component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.MethodCheckServiceProvider"
+ name="MDictOptionalCheckServiceProvider" architecture="true">
+ <requires
+ specification="org.apache.felix.ipojo.test.scenarios.service.dependency.service.FooService"
+ optional="true">
+ <callback type="bind" method="propertiesDictionaryBind" />
+ <callback type="unbind" method="propertiesDictionaryUnbind" />
+ </requires>
+ <provides />
+ </component>
+
<!-- Simple & Optional Dependencies with default-implementation -->
<component
@@ -256,6 +353,26 @@
</requires>
<provides />
</component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.CheckServiceProvider"
+ name="DIMapOptionalCheckServiceProvider" architecture="true">
+ <requires field="fs" optional="true"
+ default-implementation="org.apache.felix.ipojo.test.scenarios.component.FooServiceDefaultImpl">
+ <callback type="bind" method="propertiesMapBind" />
+ <callback type="unbind" method="propertiesMapUnbind" />
+ </requires>
+ <provides />
+ </component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.CheckServiceProvider"
+ name="DIDictOptionalCheckServiceProvider" architecture="true">
+ <requires field="fs" optional="true"
+ default-implementation="org.apache.felix.ipojo.test.scenarios.component.FooServiceDefaultImpl">
+ <callback type="bind" method="propertiesDictionaryBind" />
+ <callback type="unbind" method="propertiesDictionaryUnbind" />
+ </requires>
+ <provides />
+ </component>
<component
classname="org.apache.felix.ipojo.test.scenarios.component.MethodCheckServiceProvider"
@@ -291,6 +408,30 @@
</requires>
<provides />
</component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.MethodCheckServiceProvider"
+ name="DIMMapOptionalCheckServiceProvider" architecture="true">
+ <requires
+ specification="org.apache.felix.ipojo.test.scenarios.service.dependency.service.FooService"
+ optional="true"
+ default-implementation="org.apache.felix.ipojo.test.scenarios.component.FooServiceDefaultImpl">
+ <callback type="bind" method="propertiesMapBind" />
+ <callback type="unbind" method="propertiesMapUnbind" />
+ </requires>
+ <provides />
+ </component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.MethodCheckServiceProvider"
+ name="DIMDictOptionalCheckServiceProvider" architecture="true">
+ <requires
+ specification="org.apache.felix.ipojo.test.scenarios.service.dependency.service.FooService"
+ optional="true"
+ default-implementation="org.apache.felix.ipojo.test.scenarios.component.FooServiceDefaultImpl">
+ <callback type="bind" method="propertiesDictionaryBind" />
+ <callback type="unbind" method="propertiesDictionaryUnbind" />
+ </requires>
+ <provides />
+ </component>
<!-- Multiple Dependencies -->
<component
@@ -336,6 +477,25 @@
<provides />
</component>
<component
+ classname="org.apache.felix.ipojo.test.scenarios.component.MultipleCheckService"
+ name="MapMultipleCheckServiceProvider" architecture="true">
+ <requires field="fs">
+ <callback type="bind" method="propertiesMapBind" />
+ <callback type="unbind" method="propertiesMapUnbind" />
+ </requires>
+ <provides />
+ </component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.MultipleCheckService"
+ name="DictMultipleCheckServiceProvider" architecture="true">
+ <requires field="fs">
+ <callback type="bind" method="propertiesDictionaryBind" />
+ <callback type="unbind" method="propertiesDictionaryUnbind" />
+ </requires>
+ <provides />
+ </component>
+
+ <component
classname="org.apache.felix.ipojo.test.scenarios.component.MethodMultipleCheckService"
name="MObjectMultipleCheckServiceProvider" architecture="true">
<requires aggregate="true">
@@ -364,6 +524,24 @@
</requires>
<provides />
</component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.MethodMultipleCheckService"
+ name="MMapMultipleCheckServiceProvider" architecture="true">
+ <requires aggregate="true">
+ <callback type="bind" method="propertiesMapBind" />
+ <callback type="unbind" method="propertiesMapUnbind" />
+ </requires>
+ <provides />
+ </component>
+ <component
+ classname="org.apache.felix.ipojo.test.scenarios.component.MethodMultipleCheckService"
+ name="MDictMultipleCheckServiceProvider" architecture="true">
+ <requires aggregate="true">
+ <callback type="bind" method="propertiesDictionaryBind" />
+ <callback type="unbind" method="propertiesDictionaryUnbind" />
+ </requires>
+ <provides />
+ </component>
<!-- Multiple & Optional Dependencies -->
<component
@@ -441,7 +619,7 @@
<provides />
</component>
- <!-- Aggregate dependency as Vector -->
+ <!-- Aggregate dependency as Vector -->
<component
classname="org.apache.felix.ipojo.test.scenarios.component.VectorCheckService"
name="SimpleVectorCheckServiceProvider" architecture="true">