Author: pderop
Date: Tue Feb 2 22:11:45 2016
New Revision: 1728230
URL: http://svn.apache.org/viewvc?rev=1728230&view=rev
Log:
Removed tabs from sample code.
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=1728230&r1=1728229&r2=1728230&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 Feb 2 22:11:45 2016
@@ -287,7 +287,7 @@ So, naturally, you can write from your i
// lifecycle dm callback that allow you to add more dependencies
void init(Component c) {
CompletableFuture<HttpServer> futureServer =
createServer().listenFuture();
- component(c, comp -> comp.withFuture(futureService, future ->
future.cbi(this::serverReady)));
+ component(c, comp -> comp.withFuture(futureService, future ->
future.cbi(this::serverReady)));
}
// Inject our HttpServer that is listening
@@ -304,8 +304,8 @@ and your HttpService will be call in `st
Assume we have a `ServiceConsumer` which depends on the following services:
-- a required `ServiceProvider`: with `(p1=v1)` service filter and using a
"setProvider" callback.
-- a Configuration with
pid=`org.apache.felix.dm.lambda.samples.hello.ServiceConsumer`.
+- a required `ServiceProvider`: with "`(p1=v1)`" service filter and using a
"`setProvider`" callback.
+- a Configuration with
pid="`org.apache.felix.dm.lambda.samples.hello.ServiceConsumer`".
Now assume we have `ServiceProvider` provided with p1="v1" and p2=123 service
properties; and the provider also depends on:
@@ -325,11 +325,11 @@ Then we have the following typical Activ
Component consumer = dm.createComponent()
.setImplementation(ServiceConsumer.class)
-
.add(createServiceDependency().setService(ServiceProvider.class,
"(p1=v1)").setRequired(true).setCallbacks("setProvider", null))
-
.add(createConfigurationDependency().setPid("org.apache.felix.dm.lambda.samples.hello.ServiceConsumer"));
+
.add(createServiceDependency().setService(ServiceProvider.class,
"(p1=v1)").setRequired(true).setCallbacks("setProvider", null))
+
.add(createConfigurationDependency().setPid("org.apache.felix.dm.lambda.samples.hello.ServiceConsumer"));
dm.add(consumer);
- // Declare our ServiceProvider service component
+ // Declare our ServiceProvider service component
Properties properties = new Properties();
Properties.put("p1", "v1");
@@ -355,8 +355,8 @@ Now, let's rework the above example, usi
// Declare our Consumer component
component(comp -> comp.impl(ServiceConsumer.class)
- .withSrv(ServiceProvider.class, srv ->
srv.filter("(p1=v1)").cb(ServiceConsumer::setProvider))
- .withCnf(ServiceConsumer.class));
+ .withSrv(ServiceProvider.class, srv ->
srv.filter("(p1=v1)").cb(ServiceConsumer::setProvider))
+ .withCnf(ServiceConsumer.class));
// Declare our ServiceProvider service component: