fixed javadoc
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@953586 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/ServiceDependency.java b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/ServiceDependency.java
index 602eb71..776a0cf 100644
--- a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/ServiceDependency.java
+++ b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/ServiceDependency.java
@@ -108,6 +108,40 @@
/**
* Sets the dependency name. This attribute is only meaningful when dynamically configuring the dependency
* <code>filter</code> and <code>required</code> flag from the Service's init method.
+ *
+ * Usage Example of a Service whose dependency filter is configured from ConfigAdmin:
+ *
+ * <blockquote><pre>
+ * /**
+ * * A Service whose service dependency filter/require attribute may be configured from ConfigAdmin
+ * */
+ * @Service
+ * class X {
+ * private Dictionary m_config;
+ *
+ * @ConfigurationDependency(pid="MyPid")
+ * void configure(Dictionary conf) {
+ * // Initialize our service from config ...
+ *
+ * // And store the config for later usage (from our init method)
+ * m_config = config;
+ * }
+ *
+ * // The returned Map will be used to configure our "dependency1" Dependency.
+ * @Init
+ * Map init() {
+ * return new HashMap() {{
+ * put("dependency1.filter", m_config.get("filter"));
+ * put("dependency1.required", m_config.get("required"));
+ * }};
+ * }
+ *
+ * @ServiceDependency(name="dependency1")
+ * void bindOtherService(OtherService other) {
+ * // the filter and required flag will be configured from our init method.
+ * }
+ * }
+ * </pre></blockquote>
*/
String name() default "";
}
diff --git a/dependencymanager/runtime/src/main/java/org/apache/felix/dm/runtime/ServiceLifecycleHandler.java b/dependencymanager/runtime/src/main/java/org/apache/felix/dm/runtime/ServiceLifecycleHandler.java
index 7f79a26..a5e6395 100644
--- a/dependencymanager/runtime/src/main/java/org/apache/felix/dm/runtime/ServiceLifecycleHandler.java
+++ b/dependencymanager/runtime/src/main/java/org/apache/felix/dm/runtime/ServiceLifecycleHandler.java
@@ -52,24 +52,23 @@
*
* Example of a Service whose dependency filter is configured from ConfigAdmin:
*
- * <blockquote>
- *
- * <pre>
+ * <blockquote><pre>
* /**
- * * All Service whose service dependency filter/require attribute may be configured from ConfigAdmin
+ * * A Service whose service dependency filter/require attribute may be configured from ConfigAdmin
* */
* @Service
* class X {
* private Dictionary m_config;
*
- * @ConfigurationDependency(pid="MyPid")
+ * @ConfigurationDependency(pid="MyPid")
* void configure(Dictionary conf) {
* // Initialize our service from config ...
*
- * // And store the config for late usage (from our init method)
+ * // And store the config for later usage (from our init method)
* m_config = config;
* }
- *
+ *
+ * // The returned Map will be used to configure our "dependency1" Dependency.
* @Init
* Map init() {
* return new HashMap() {{
@@ -83,6 +82,7 @@
* // the filter and required flag will be configured from our init method.
* }
* }
+ * </pre></blockquote>
*/
public class ServiceLifecycleHandler
{