Author: buildbot
Date: Wed Feb 3 07:42:18 2016
New Revision: 979354
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/guides/dm-lambda.html
Propchange: websites/staging/felix/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Wed Feb 3 07:42:18 2016
@@ -1 +1 @@
-1728239
+1728263
Modified:
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/dm-lambda.html
==============================================================================
---
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/dm-lambda.html
(original)
+++
websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/dm-lambda.html
Wed Feb 3 07:42:18 2016
@@ -299,7 +299,7 @@ service properties as a suite of "<code>
<h2 id="managing-components-outside-of-activators">Managing components outside
of Activators.<a class="headerlink"
href="#managing-components-outside-of-activators" title="Permanent
link">¶</a></h2>
-<p>You can create Components outside of the Activator by using some static
factory methods from the <code>DependencyManagerActivator</code> class.</p>
+<p>You can manage Components outside of the Activator by using some static
factory methods from the <code>DependencyManagerActivator</code> class.</p>
<p>For example, considere a use case where you want to retrieve some
informations from some already injected services, and you then want to
dynamically add more dependencies from your
<code>init</code> component callback. First let's look at the Activator:</p>
<div class="codehilite"><pre><span class="kd">public</span> <span
class="kd">class</span> <span class="nc">Activator</span> <span
class="kd">extends</span> <span class="n">DependencyActivatorBase</span> <span
class="o">{</span>
@@ -346,11 +346,22 @@ what it has parsed, it will possibly add
</pre></div>
+<p>And an example where you create a new DM component from the code:</p>
+<div class="codehilite"><pre><span class="kd">public</span> <span
class="kd">class</span> <span class="nc">Pojo</span> <span class="o">{</span>
+ <span class="kd">volatile</span> <span class="n">DependencyManager</span>
<span class="n">m_dm</span><span class="o">;</span>
+
+ <span class="kt">void</span> <span class="nf">createComponent</span><span
class="o">()</span> <span class="o">{</span>
+ <span class="n">component</span><span class="o">(</span><span
class="n">m_dm</span><span class="o">,</span> <span class="n">comp</span> <span
class="o">-></span> <span class="n">comp</span><span class="o">.</span><span
class="na">impl</span><span class="o">(</span><span
class="n">NewComponent</span><span class="o">.</span><span
class="na">class</span><span class="o">).</span><span
class="na">withSrv</span><span class="o">(</span><span
class="n">LogService</span><span class="o">.</span><span
class="na">Class</span><span class="o">,</span> <span
class="n">EventAdmin</span><span class="o">.</span><span
class="na">class</span><span class="o">));</span>
+ <span class="o">}</span>
+<span class="o">}</span>
+</pre></div>
+
+
<h2 id="completablefuture-dependency">CompletableFuture dependency.<a
class="headerlink" href="#completablefuture-dependency" title="Permanent
link">¶</a></h2>
<p>The new library provides a new feature which allows your component to
depend on the result of a jdk8 <code>CompletableFuture</code>.
CompletableFuture java8 class provides an asynchronous event-driven model and
you can now define dependencies on any asynchronous events,
like if they were service dependencies.</p>
-<p>Let's explose this new dependency using an advanced example: assume you
develop a component that needs to
+<p>Let's explore this new dependency using an advanced example: assume you
develop a component that needs to
track any "Tracked" services registered in the Registry, using a classic
whiteboard pattern. But before, you need to
download a web page at initialization, before you component is started. The
downloaded webpage is required to be able to
handle Tracked services. Now, you don't want to block the initialization of
your component (because in a reactive word,
@@ -540,7 +551,7 @@ and the service is registered.</p>
<p>Caution: if you are using a corporate http proxy, you have to fix the
Activator in order to configure the ip addr and port number of your
http proxy.</p>
<div class="timestamp" style="margin-top: 30px; font-size: 80%;
text-align: right;">
- Rev. 1728239 by pderop on Tue, 2 Feb 2016 23:41:12 +0000
+ Rev. 1728263 by pderop on Wed, 3 Feb 2016 07:41:35 +0000
</div>
<div class="trademarkFooter">
Apache Felix, Felix, Apache, the Apache feather logo, and the Apache
Felix project