You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by bu...@apache.org on 2018/10/09 14:22:25 UTC

svn commit: r1036199 - in /websites/staging/felix/trunk/content: ./ documentation/subprojects/apache-felix-dependency-manager/reference/dm-annotations.html

Author: buildbot
Date: Tue Oct  9 14:22:25 2018
New Revision: 1036199

Log:
Staging update by buildbot for felix

Modified:
    websites/staging/felix/trunk/content/   (props changed)
    websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/reference/dm-annotations.html

Propchange: websites/staging/felix/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Tue Oct  9 14:22:25 2018
@@ -1 +1 @@
-1843282
+1843289

Modified: websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/reference/dm-annotations.html
==============================================================================
--- websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/reference/dm-annotations.html (original)
+++ websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/reference/dm-annotations.html Tue Oct  9 14:22:25 2018
@@ -96,7 +96,7 @@ h2:hover > .headerlink, h3:hover > .head
 <li><a href="#component">Component</a></li>
 <li><a href="#aspect-component">Aspect component</a></li>
 <li><a href="#adapter-component">Adapter component</a></li>
-<li><a href="#bundle-adapter-service">Bundle adapter service</a></li>
+<li><a href="#bundle-adapter-component">Bundle adapter component</a></li>
 </ul>
 </li>
 <li><a href="#component-lifecycle">Component lifecycle</a><ul>
@@ -429,7 +429,7 @@ found from the registry. </p>
 
 <p>The AdapterImpl class adapts the AdapteeService to the AdapterService. 
 The AdapterService will also have the following service property: p1=v1, p2=v2 :</p>
-<h2 id="bundle-adapter-service">Bundle adapter service<a class="headerlink" href="#bundle-adapter-service" title="Permanent link">&para;</a></h2>
+<h2 id="bundle-adapter-component">Bundle adapter component<a class="headerlink" href="#bundle-adapter-component" title="Permanent link">&para;</a></h2>
 <p>Bundle adapters are similar to Adapter Components, but instead of adapting a service, they adapt a bundle 
 with a certain set of states (STARTED|INSTALLED|...), and provide a service on top of it.</p>
 <p>You can define a bundle adapter service using the @BundleAdapterService annotation (see 
@@ -473,7 +473,7 @@ includes the invocation of the following
 <p><a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r12/org/apache/felix/dm/annotation/api/Init.html">@Init</a>:
 this callback is invoked after all required dependencies have been injected. In this method, you can 
 yet add more dynamic dependencies using the DM API, or you can possibly configure other dependencies filter and required flags
-(see ## Dynamic Dependency Configuration).</p>
+(see <a href="## Dynamic dependency configuration">Dynamic dependency configuration</a>).</p>
 </li>
 <li>
 <p><a href="http://felix.apache.org/apidocs/dependencymanager.annotations/r12/org/apache/felix/dm/annotation/api/Start.html">@Start</a>:
@@ -620,7 +620,7 @@ full control of when your component is <
 <span class="cm"> * This is the DHTService, which registers a DHTElement asynchronously.</span>
 <span class="cm"> */</span>
 <span class="kd">public</span> <span class="kd">interface</span> <span class="nc">DHTService</span> <span class="o">{</span>
-   <span class="kt">void</span> <span class="nf">insert</span><span class="o">();</span> <span class="c1">// will callback element.inserted() later, once registered into the DHT.</span>
+   <span class="kt">void</span> <span class="nf">insert</span><span class="o">(</span><span class="n">DHTElement</span> <span class="n">element</span><span class="o">);</span> <span class="c1">// will callback element.inserted() later, once registered into the DHT.</span>
 <span class="o">}</span>
 </pre></div>
 
@@ -632,7 +632,7 @@ full control of when your component is <
     <span class="n">DHTService</span> <span class="n">m_dht</span><span class="o">;</span>
 
     <span class="nd">@LifecycleController</span>
-    <span class="n">Runnable</span> <span class="n">m_registered</span><span class="o">;</span> <span class="c1">// will fire component startup, once invoked.</span>
+    <span class="n">Runnable</span> <span class="n">m_start</span><span class="o">;</span> <span class="c1">// will fire component startup, once invoked.</span>
 
     <span class="nd">@Init</span>
     <span class="kt">void</span> <span class="nf">init</span><span class="o">()</span> <span class="o">{</span>
@@ -643,7 +643,7 @@ full control of when your component is <
         <span class="c1">// We are inserted into the DHT: we can now trigger our component startup.</span>
         <span class="c1">// We just invoke the runnable injected by our @LifecycleController annotation, which will trigger our</span>
         <span class="c1">// service publication (we&#39;ll be called in our @Start method before)</span>
-        <span class="n">m_registered</span><span class="o">.</span><span class="na">run</span><span class="o">();</span>
+        <span class="n">m_start</span><span class="o">.</span><span class="na">run</span><span class="o">();</span>
     <span class="o">}</span>
 
     <span class="nd">@Start</span>
@@ -662,11 +662,11 @@ full control of when your component is <
     <span class="n">DHTService</span> <span class="n">m_dht</span><span class="o">;</span>
 
     <span class="nd">@LifecycleController</span>
-    <span class="n">Runnable</span> <span class="n">m_registered</span><span class="o">;</span> <span class="c1">// will fire component startup, once invoked.</span>
+    <span class="n">Runnable</span> <span class="n">m_start</span><span class="o">;</span> <span class="c1">// will fire component startup, once invoked.</span>
 
     <span class="nd">@Init</span>
     <span class="kt">void</span> <span class="nf">init</span><span class="o">()</span> <span class="o">{</span>
-        <span class="n">m_dht</span><span class="o">.</span><span class="na">insert</span><span class="o">(</span><span class="nl">m_registered:</span><span class="o">:</span><span class="n">run</span><span class="o">);</span> <span class="c1">// asynchronous, will callback m_registered.run() once registered into the DHT</span>
+        <span class="n">m_dht</span><span class="o">.</span><span class="na">insert</span><span class="o">(</span><span class="nl">m_start:</span><span class="o">:</span><span class="n">run</span><span class="o">);</span> <span class="c1">// asynchronous, will callback m_registered.run() once registered into the DHT</span>
     <span class="o">}</span>
 
     <span class="nd">@Start</span>
@@ -885,7 +885,7 @@ In this case, you need to use the <code>
 
 <h3 id="service-dependency-properties-propagation">Service dependency properties propagation<a class="headerlink" href="#service-dependency-properties-propagation" title="Permanent link">&para;</a></h3>
 <p>It is possible to propagate the dependency service properties, using the ServiceDependency.propagate attribute.
-When the service dependency properties are propagate, they will be appended to the component service properties, 
+When the service dependency properties are propagated, they will be appended to the component service properties, 
 but won't override them (the component service properties takes precedence over the propagated service dependencies).</p>
 <p>Example:</p>
 <div class="codehilite"><pre><span class="nd">@Component</span>
@@ -1176,7 +1176,7 @@ the Map, using the "<em>filter</em>" and
 
 
 <p>So, after the init method returns, the map will be used to configure  the dependency named "foo", which will then be evaluated. 
-And once the  dependency is available, then your @Start callback will be invoked.</p>
+And once the  dependency is available, then it will be injected and your @Start callback will be invoked.</p>
 <p>Usage example of a dynamic dependency:</p>
 <p>In this sample, the "PersistenceImpl" component dynamically configures the "storage" 
 dependency from the "init" method. The dependency "required" flag and filter string are derived 
@@ -1265,7 +1265,9 @@ but this time, the dependency on the Sto
 
 <p>Same example as above, but this time the dependency is added from the init method using the 
 Dependency Manager Lambda API:</p>
-<div class="codehilite"><pre><span class="nd">@Component</span>
+<div class="codehilite"><pre><span class="kn">import</span> <span class="nn">static</span> <span class="n">org</span><span class="o">.</span><span class="na">apache</span><span class="o">.</span><span class="na">felix</span><span class="o">.</span><span class="na">dm</span><span class="o">.</span><span class="na">lambda</span><span class="o">.</span><span class="na">DependencyManagerActivator</span><span class="o">.</span><span class="na">component</span><span class="o">;</span>
+
+<span class="nd">@Component</span>
 <span class="kd">public</span> <span class="kd">class</span> <span class="nc">PersistenceImpl</span> <span class="kd">implements</span> <span class="n">Persistence</span> <span class="o">{</span>
     <span class="c1">// Injected before init.</span>
     <span class="nd">@ConfigurationDependency</span>
@@ -1651,7 +1653,7 @@ in the following, the service properties
 <span class="o">}</span>
 </pre></div>
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
-        Rev. 1843274 by pderop on Tue, 9 Oct 2018 13:36:23 +0000
+        Rev. 1843289 by pderop on Tue, 9 Oct 2018 14:22:04 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Felix, Felix, Apache, the Apache feather logo, and the Apache Felix project