You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by pd...@apache.org on 2016/03/02 00:40:15 UTC

svn commit: r1733191 - /felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/dm-lambda.mdtext

Author: pderop
Date: Tue Mar  1 23:40:15 2016
New Revision: 1733191

URL: http://svn.apache.org/viewvc?rev=1733191&view=rev
Log:
Updated completable future doc.

Modified:
    felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/dm-lambda.mdtext

Modified: felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/dm-lambda.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/dm-lambda.mdtext?rev=1733191&r1=1733190&r2=1733191&view=diff
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/dm-lambda.mdtext (original)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager/guides/dm-lambda.mdtext Tue Mar  1 23:40:15 2016
@@ -781,9 +781,11 @@ So, you use an `HttpClient` which allows
 which does not block the current thread, but instead returns `CompletableFuture<String>`
 which represents the future result of the asynchronously downloaded page.
 
-So, from your component init() method, you can just declare a FutureDependency on the result of the `CompletableFuture<String>`
+So, from your component init() method, you can just declare a FutureDependency on the result of the `CompletableFuture<String>`.
+A Future Dependency can be defined using the "withFuture" method available from the ComponentBuilder interface,  and this method takes as argument two args: a CompletableFuture, and a 
+`consumer<FutureDependencyBuilder>`. The second arg is a lambda that can be used to configure the callback to invoke when the CF has completed.
 
-And once the result will be completed, you will then be called in your start() callback, and at this point, the Tracked services will then
+And once the result completes, start() will be called, and at this point, the Tracked services will then
 be injected (using DM, optional service callbacks are always invoked after the start() callback, never before).
 
 So, the Activator looks like this: