Author: pderop
Date: Wed Feb 24 08:52:45 2016
New Revision: 1732041

URL: http://svn.apache.org/viewvc?rev=1732041&view=rev
Log:
update config type examples.

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=1732041&r1=1732040&r2=1732041&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
 Wed Feb 24 08:52:45 2016
@@ -434,6 +434,14 @@ Code example with a component that defin
         }
     }
  
+Same example, using a shortcut for the `withCnf` dependency, which is only 
defining the configuration type (the pid is assumed to 
+be the fqdn of the config type, and the callback name is assumed to be 
"updated"):
+
+    public class Activator extends DependencyManagerActivator {
+        public void init(BundleContext ctx, DependencyManager dm) throws 
Exception { 
+            component(comp -> 
comp.impl(ServiceImpl.class).withCnf(MyConfig.class));  
+        }
+    }
 
 Code example with a component that defines a Configuration Dependency using a 
specific callback method reference which accepts a Dictionary in argument:
 


Reply via email to