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 2013/04/25 10:24:34 UTC

svn commit: r1475667 - /felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/describing-components/service-requirement-handler.mdtext

Author: clement
Date: Thu Apr 25 08:24:33 2013
New Revision: 1475667

URL: http://svn.apache.org/r1475667
Log:
Fixed missing / in callback documentation

Modified:
    felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/describing-components/service-requirement-handler.mdtext

Modified: felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/describing-components/service-requirement-handler.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/describing-components/service-requirement-handler.mdtext?rev=1475667&r1=1475666&r2=1475667&view=diff
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/describing-components/service-requirement-handler.mdtext (original)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/describing-components/service-requirement-handler.mdtext Thu Apr 25 08:24:33 2013
@@ -121,8 +121,8 @@ The `modified` callback is not mandatory
     :::xml
     <component classname="...HelloConsumer">
     <requires>
-        <callback type="bind" method="bindHello">
-        <callback type="unbind" method="unbindHello">
+        <callback type="bind" method="bindHello"/>
+        <callback type="unbind" method="unbindHello"/>
     </requires>
     ...
     </component>
@@ -185,8 +185,8 @@ In XML, it results in:
     :::xml
     <component classname="...HelloConsumer">
         <requires  field="m_hello">
-            <callback type="bind" method="bindHello">
-            <callback type="unbind" method="unbindHello">
+            <callback type="bind" method="bindHello"/>
+            <callback type="unbind" method="unbindHello"/>
         </requires>
         ...
     </component>
@@ -222,10 +222,10 @@ When a component requires several provid
     @Component
     public class HelloConsumer {
          @Requires
-         private Hello m_hellos[]({{ refs..path }}); // Array => Aggregate
+         private Hello m_hellos[]; // Array => Aggregate
          public doSomething() {
                  for(int I = 0; I < m_hellos.length; i++) { 
-                     System.out.println(m_hellos[i]({{ refs.i.path }}).getMessage());
+                     System.out.println(m_hellos[i].getMessage());
                  }
            }
     }
@@ -311,8 +311,8 @@ This dependency can also be described in
 
     :::xml
     <requires  aggregate="true">
-        <callback type="bind" method="bindHello">
-        <callback type="unbind" method="unbindHello">
+        <callback type="bind" method="bindHello"/>
+        <callback type="unbind" method="unbindHello"/>
     </requires>
 
 In this case, iPOJO cannot detect if the dependency is aggregate or not. So, you need to add the '*aggregate*' attribute. The bindHello and unbindHello will be called each time a Hello service appears or disappears.
@@ -374,8 +374,8 @@ For this component, XML metadata could b
     :::xml
     <component classname="...HelloConsumer">
         <requires optional="true">
-            <callback type="bind" method="bindHello">
-            <callback type="unbind" method="unbindHello">
+            <callback type="bind" method="bindHello"/>
+            <callback type="unbind" method="unbindHello"/>
         </requires>
         ...
     </component>
@@ -392,7 +392,7 @@ A dependency can be both aggregate and o
     @Component
     public class HelloConsumer {
          @Requires(optional=true)
-         private Hello m_hellos[]({{ refs..path }});
+         private Hello m_hellos[];
 
          public doSomething() {
                for(Hello h : m_hellos) { 
@@ -436,8 +436,8 @@ For this component, XML metadata could b
     
     :::xml
     <requires aggregate="true" optional="true">
-         <callback type="bind" method="bindHello">
-         <callback type="unbind" method="unbindHello">
+         <callback type="bind" method="bindHello"/>
+         <callback type="unbind" method="unbindHello"/>
     </requires>
 
 In this case, you need to add the *'aggregate'* attribute and the *'optional'*attribute. The `bindHello` and `unbindHello` will be called each time a Hello service appears or disappears. These bind / unbind methods are not called when binding / unbinding a Nullable object (when both field and method are used).