You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ma...@apache.org on 2015/03/09 16:57:25 UTC

svn commit: r1665268 - /felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/

Author: marrs
Date: Mon Mar  9 15:57:25 2015
New Revision: 1665268

URL: http://svn.apache.org/r1665268
Log:
Added more information to the component-related pages.

Modified:
    felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-adapter.mdtext
    felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-aspect.mdtext
    felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-bundle-adapter.mdtext
    felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-factory-configuration-adapter.mdtext
    felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-resource-adapter.mdtext
    felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-singleton.mdtext
    felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/components.mdtext

Modified: felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-adapter.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-adapter.mdtext?rev=1665268&r1=1665267&r2=1665268&view=diff
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-adapter.mdtext (original)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-adapter.mdtext Mon Mar  9 15:57:25 2015
@@ -1,22 +1,25 @@
-#### Adapters
+# Adapters
 
-Adapters, like aspects, are used to "extend" existing services, and can publish different services based on the existing one. An example would be implementing a management interface.
+Adapters, like [aspects](component-aspect.html), are used to "extend" existing services, and can publish different services based on the existing one. An example would be implementing a management interface.
 
+An adapter will be applied to any service that matches the specified interface and filter. For each matching service an adapter will be created based on the adapter implementation class. The adapter will be registered with the specified interface and existing properties from the original service plus any extra properties you supply here. It will also inherit all dependencies, and if you declare the original service as a member it will be injected.
 
+An example:
 
-## @AdapterService
+	manager.createAdapterService(AdapteeService.class, "(foo=bar)")
+		.setInterface(AdapterService.class, new Hashtable() {{ put("extra", "property"); }})
+		.setImplementation(AdapterImpl.class);
 
-Adapters, like with *@AspectService*, are used to "extend" existing services, 
-and can publish different services based on the existing one. An example 
-would be implementing a management interface for an existing service, 
-etc .... When you annotate an adapter class with the *@AdapterService* 
+# @AdapterService
+
+Adapters, like with *@AspectService*, are used to "extend" existing services, and can publish different services based on the existing one. When you annotate an adapter class with the *@AdapterService* 
 annotation, it will be applied to any service that matches the implemented 
 interface and filter. The adapter will be registered with the specified 
 interface and existing properties from the original service plus any extra
 properties you supply here. If you declare the original service as a member 
 it will be injected. 
 
-### Annotation attributes:
+## Annotation attributes:
 
 ----
 **`adapteeService`**    
@@ -56,7 +59,7 @@ Sets the filter condition to use with th
 Sets the static method used to create the adapter service implementation 
 instance. By default, the default constructor of the annotated class is used.
 
-### Usage example
+## Usage example
 
 Here, the AdapterService is registered into the OSGI registry each time an AdapteeService is found from the registry. The AdapterImpl class adapts the AdapteeService to the AdapterService. The AdapterService will also have a service property (param=value), and will also include eventual service properties found from the AdapteeService:
 

Modified: felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-aspect.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-aspect.mdtext?rev=1665268&r1=1665267&r2=1665268&view=diff
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-aspect.mdtext (original)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-aspect.mdtext Mon Mar  9 15:57:25 2015
@@ -1,15 +1,14 @@
-#### Aspects
+# Aspects
 
 Aspects, as part of aspect oriented programming, can be used in a dynamic environment such as OSGi to "extend" existing services and add certain "capabilities" to them. Examples of these are adding a specific caching mechanism to a storage service or implementing logging. Aspects in OSGi can be applied to services and can be added and removed at runtime.
 
+Aspects allow you to define an "interceptor", or chain of interceptors for a service to add features like caching or logging, etc. An aspect will be applied to any service that matches the specified interface and filter. For each matching service an aspect will be created based on the aspect implementation class. The aspect will be registered with the same interface and properties as the original service, plus any extra properties you supply here. It will also inherit all dependencies, and if you declare the original service as a member it will be injected.
 
+# @AspectService
 
+The *@AspectService* annotation allows you to create an aspect service. It supports the following attributes mentioned below.
 
-## @AspectService
-
-Aspects allow you to define an interceptor, or chain of interceptors for a service (to add features like caching or logging, etc ...). The dependency manager intercepts the original service, and allows you to execute some code before invoking the original service ... The aspect will be applied to any service that matches the specified interface and filter and will be registered with the same interface and properties as the original service, plus any extra properties you supply here. It will also inherit all dependencies, and if you declare the original service as a member it will be injected.
-
-### Annotation attributes
+## Annotation attributes
 
 ----
 **`ranking`**    
@@ -61,7 +60,7 @@ instance. The default constructor of the
 The factoryMethod can be used to provide a specific aspect implements, 
 like a DynamicProxy.
 
-### Usage example:
+## Usage example:
 
      @AspectService(ranking=10), properties={@Property(name="param", value="value")})
      class AspectService implements InterceptedService {

Modified: felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-bundle-adapter.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-bundle-adapter.mdtext?rev=1665268&r1=1665267&r2=1665268&view=diff
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-bundle-adapter.mdtext (original)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-bundle-adapter.mdtext Mon Mar  9 15:57:25 2015
@@ -1,6 +1,4 @@
-
-
-## @BundleAdapterService
+# Bundle Adapters
 
 Bundle adapters are similar to AdapterService, but instead of adapting a 
 service, they adapt a bundle with a certain set of states (STARTED|INSTALLED|...), and provide a service on top of it.
@@ -13,7 +11,18 @@ with the specified interface and with se
 original bundle OSGi manifest headers plus any extra properties you supply 
 here. If you declare the original bundle as a member it will be injected. 
 
-### Annotation attributes:
+An example:
+
+	manager.createBundleAdapterService(Bundle.INSTALLED | Bundle.RESOLVED | Bundle.ACTIVE, 
+		"(Bundle-SymbolicName=org.apache.felix.dependencymanager)", true)
+		.setInterface(AdapterService.class.getName(), new Hashtable() {{ put("foo", "bar"); }})
+		.setImplementation(AdapterServiceImpl.class);
+
+# @BundleAdapterService
+
+The following attributes are supported.
+
+## Annotation attributes:
 
 ----
 **`filter`**    
@@ -62,7 +71,7 @@ exposed service properties.
 Sets the static method used to create the BundleAdapterService implementation 
 instance.
 
-### Usage Examples
+## Usage Examples
 
 In the following example, a "VideoPlayer" Service is registered into the OSGi registry each time an active bundle containing a "Video-Path" manifest header is detected:
 

Modified: felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-factory-configuration-adapter.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-factory-configuration-adapter.mdtext?rev=1665268&r1=1665267&r2=1665268&view=diff
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-factory-configuration-adapter.mdtext (original)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-factory-configuration-adapter.mdtext Mon Mar  9 15:57:25 2015
@@ -1,4 +1,14 @@
-## @FactoryConfigurationAdapterService
+# Factory Configuration Adapter Service
+
+A factory configuration adapter service creates an adapter for each matching configuration in Configuration Admin. For each new factory configuration matching the factoryPid, an adapter will be created based on the adapter implementation class. The adapter will be registered with the specified interface and with the specified adapter service properties. Depending on the propagate parameter, every public factory configuration properties (which don't start with ".") will be propagated along with the adapter service properties. It will also inherit all dependencies.
+
+Usage Example:
+
+	manager.createFactoryConfigurationAdapterService("MyFactoryPid", "update", true)
+		.setInterface(AdapterService.class.getName(), new Hashtable() {{ put("foo", "bar"); }})
+		.setImplementation(AdapterServiceImpl.class);         
+
+# @FactoryConfigurationAdapterService
 
 Annotates a class that acts as a Factory Configuration Adapter Service. 
 For each new Config Admin factory configuration matching the specified 
@@ -12,7 +22,7 @@ Like in @ConfigurationDependency, you ca
 your configurations for Web Console GUI customization (configuration 
 heading/descriptions/default values/etc ...). 
 
-### Annotation attributes:
+## Annotation attributes:
 
 ----
 **`provides`**    
@@ -72,7 +82,7 @@ are merged with these.
 
 Sets the static method used to create the adapter instance.
 
-### Usage Examples
+## Usage Examples
 
 Here, a "Dictionary" service instance is instantiated for each existing 
 factory configuration instances matching the "DictionaryServiceFactory" 

Modified: felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-resource-adapter.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-resource-adapter.mdtext?rev=1665268&r1=1665267&r2=1665268&view=diff
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-resource-adapter.mdtext (original)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-resource-adapter.mdtext Mon Mar  9 15:57:25 2015
@@ -1,11 +1,16 @@
-#### Resource Adapters
+# Resource Adapters
 
 Resource adapters work just like adapters, but instead of working with services, they work with resources. Resources, represented as a URL, are an abstraction introduced to provide a generic way of dealing with "blobs" and can be resources inside a bundle, filesystem or some kind of data store.
 
+A resource adapter will be applied to any resource that matches the specified filter condition. For each matching resource an adapter will be created based on the adapter implementation class. The adapter will be registered with the specified interface and existing properties from the original resource plus any extra properties you supply here. It will also inherit all dependencies, and if you declare the original service as a member it will be injected.
 
+Usage Example:
 
+	manager.createResourceAdapterService("(&(path=/test)(repository=TestRepository))", true)
+		.setInterface(AdapterService.class.getName(), new Hashtable() {{ put("foo", "bar"); }})
+		.setImplementation(AdapterServiceImpl.class);
 
-## @ResourceAdapterService
+# @ResourceAdapterService
 
 Resource adapters are things that adapt a resource instead of a service, and 
 provide an adapter service on top of this resource. Resources are an 
@@ -24,11 +29,11 @@ properties will be propagated from the r
 * *protocol*: the resource URL protocol
 * *port*: the resource URL port 
 
-### Annotation attributes
+## Annotation attributes
 
 TBD
 
-### Usage Examples:
+## Usage Examples:
 
 Here, the "VideoPlayer" service provides a video service on top of any movie 
 resources, with service properties "host"/"port"/"protocol"/"path" extracted 

Modified: felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-singleton.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-singleton.mdtext?rev=1665268&r1=1665267&r2=1665268&view=diff
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-singleton.mdtext (original)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/component-singleton.mdtext Mon Mar  9 15:57:25 2015
@@ -0,0 +1,181 @@
+# Component
+
+Components are the main building blocks for OSGi applications. They can publish themselves as a service, and they can have dependencies. These dependencies will influence their life cycle as component will only be activated when all required dependencies are available.
+
+Usage example:
+
+	dm.add(createComponent()
+		.setInterface(TranslationService.class.getName(), null)
+		.setImplementation(GoogleBasedTranslationService.class)
+		.add(createServiceDependency()
+			.setService(LocalizationService.class, "(language=en)")
+			.setRequired(true)
+		)
+		.add(createServiceDependency()
+			.setService(LogService.class)
+			.setRequired(false)
+		)
+	);
+
+# @Component
+
+This annotation annotates an implementation class that optionally publishes 
+an OSGi service, and optionally has some dependencies, with a managed 
+lifecycle. 
+
+## Annotation attributes
+
+----
+**`provides`**    
+*Required*: No    
+*Default*: all implemented interfaces, if any.   
+
+By default, the component is registered into the OSGi registry under all 
+directly implemented interfaces. If no interfaces are implemented, then the 
+component is not registered, but it still has a managed lifecycle, and may 
+have some dependencies. If you need to  explicitly define the list of 
+interfaces (or classes) under which the  component must be registered in the 
+OSGi registry, then use the *provides* attribute. You can also set this 
+property to an empty array of classes  if you don't want at all your component 
+to be exposed in the OSGi  registry (even if it implements some interfaces).
+
+----
+**`properties`**    
+*Required*: No    
+*Default*: --  
+
+the *properties" attribute enumerates the list of properties that are part of 
+the Service exposed by the component in the OSGi Registry. 
+Each property is defined using the @Property annotation, which represents a  
+key/value pair. When a value is actually an array of strings, 
+then the *values* attribute of the @Property annotation can be used. 
+This attribute  is not the only way to specify OSGi Service properties 
+(see Setting Service properties in the lifecycle section).
+
+----
+**`factoryMethod`**    
+*Required*: No    
+*Default*: --  
+
+This attribute refers to a static method name from the annotated class which 
+can be used to instantiate the component instance. Normally, DependencyManager 
+instantiates the component using its class name, and with the default 
+constructor of the class, but there are some cases where it is required to 
+take control of  how the component is created. For instance, this method may 
+be used to create the component as a dynamic proxy ...
+
+----
+**`factoryName`**    
+*Required*: No    
+*Default*: --  
+ 
+This attribute is the identifier for a component factory. By default, a 
+component is automatically instantiated as a singleton when the bundle is 
+started, and when all required dependencies are satisfied. But when a 
+component must be created, configured, or disposed dynamically, and when 
+multiple instances of the same component are needed, a factoryName can  be 
+used. When you use this attribute, a *org.apache.felix.dm.runtime.api.ComponentFactory* 
+OSGi Service will be provided with a *dm.factory.name* service property matching your 
+specified factoryName attribute. The ComponentFactory will be provided once the 
+component bundle is started, even if required dependencies are not available, 
+and the ComponentFactory will be unregistered from the OSGi registry once the component 
+bundle is stopped or disposed using the *ComponentInstance.dispose()* method.
+
+----
+**`factoryConfigure`**    
+*Required*: No    
+*Default*: --  
+
+This attributes sets the *configure* method name to be called with the factory 
+configuration. This attribute only makes sense if the *factoryName* attribute 
+is used. If specified, then this attribute references a component callback 
+method, which is called for providing the configuration supplied by the 
+factory that instantiated this component. The current Service properties will 
+be also updated with all public properties (which don't start with a dot).
+
+Usage example:
+
+    :::java
+    /**
+     * This component will be activated once the bundle is started and when all required dependencies
+     * are available.
+     */
+    @Component
+    class X implements Z {
+        @ConfigurationDependency(pid="MyPid")
+        void configure(Dictionary conf) {
+             // Configure or reconfigure our service.
+        }
+    
+        @Start
+        void start() {
+            // Our component is starting and is about to be registered in the OSGi registry as a Z service.
+        }
+    
+        public void doService() {
+            // ...
+        }
+    }
+    
+
+Example using a factoryName, where the X component is instantiated/updated/disposed by another Y component:
+
+    :::java
+     import org.apache.felix.dm.runtime.api.ComponentFactory;
+     import org.apache.felix.dm.runtime.api.ComponentInstance;
+
+     @Component(factoryName="MyComponentFactory", factoryConfigure="configure")
+     class X implements Z {
+         void configure(Dictionary conf) {
+             // Configure or reconfigure our component. The conf is provided by 
+             // the factory, and all public properties (which don't
+             // start with a dot) are propagated with the Service
+             // properties eventually specified in the properties
+             // annotation attribute.
+         }
+    
+         @ServiceDependency
+         void bindOtherService(OtherService other) {
+             // store this require dependency
+         }
+    
+         @Start
+         void start() {
+             // Our component is starting and is about to be registered
+             // in the OSGi registry as a Z service.
+         }
+    
+         public void doService() {
+             // ... part of Z interface
+         }
+     }
+    
+     /**
+      * This class will instantiate some X component instances
+      */
+     @Component
+     class Y {
+         // This Set acts as a Factory API for creating X component instances.
+         @ServiceDependency(filter="(dm.factory.name=MyComponentFactory)")
+         ComponentFactory _XFactory; 
+    
+         @Start
+         void start() {
+             // Instantiate a X component instance
+             Dictionary x1 = new Hashtable() {{ put("foo", "bar1"); }};
+             ComponentInstance i1 = _XFactory.newInstance(x1);
+    
+             // Instantiate another X component instance
+             Dictionary x2 = new Hashtable() {{ put("foo", "bar2"); }};
+             ComponentInstance i2 = _XFactory.newInstance(x2);
+    
+             // Update the first X component instance
+             x1 = new Hashtable() {{ put("foo", "bar1_modified"); }};
+             i1.update(x1);
+    
+             // Destroy components
+             i1.dispose();
+             i2.dispose();
+         }
+    }
+

Modified: felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/components.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/components.mdtext?rev=1665268&r1=1665267&r2=1665268&view=diff
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/components.mdtext (original)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager-4/reference/components.mdtext Mon Mar  9 15:57:25 2015
@@ -15,9 +15,7 @@ There are different types of Dependency
 * [*Resource Adapter Service*](component-singleton.html): creates an OSGi service on top of a specific Resource.
 * [*Factory Configuration Adapter Service*](component-singleton.html): creates an OSGi service from ConfigAdmin, using a factoryPid, and a ManagedServiceFactory.
 
-# Component
-
-## Life cycle
+# Life cycle
 
 The dependency manager, as part of a bundle, shares the generic bundle life cycle explained in the OSGi specification. The life cycle of the dependency manager itself, and the components it manages, can be located inside the *active* state of the hosting bundle.
 
@@ -36,185 +34,19 @@ Changes in the state of the component wi
 
 The dependency manager will look for methods with these names and one of the following signatures in this order:
 
-* (Component),
-* ().
+* `(Component)`,
+* `()`.
 
 If you don't specify anything, the methods with these names will be invoked on the instance. By using `setCallbacks()` you can however change this behavior: You can change the names of the methods to look for. Any methods that are set to ` null ` will not be invoked at all. Another thing you can do is to specify a different instance to invoke these methods on. If you do that, you will usually want to use the first signature, which gives you a reference to the ` Component ` whose life cycle method was invoked.
 
-## Interfaces and properties
+# Interfaces and properties
 
 Components in the context of the dependency manager can be published as OSGi services under one or more interface names, plus optionally a set of properties. This is no different than a normal OSGi service. It's important to mention that you don't have to register a service. If you don't, you basically created a component that can do work and have dependencies and a managed life cycle.
 
-## Composition
+# Composition
 
 When implementing more complex components, you often find yourself using more than one instance. However, several of these instances might want to have dependencies injected. In such cases you need to tell the dependency manager which instances to consider. This has to be a fixed set of instances however.
 
-## Factories
+# Factories
 
 Out of the box, there already is support for lazy instantiation, meaning that the dependency manager can create component instances for you when their required dependencies are resolved. However, sometimes creating a single instance using a default constructor is not enough. In those cases, you can tell the dependency manager to delegate the creation process to a factory.
-
-# Annotations
-
-
-## @Component
-
-This annotation annotates an implementation class that optionally publishes 
-an OSGi service, and optionally has some dependencies, with a managed 
-lifecycle. 
-
-### Annotation attributes
-
-----
-**`provides`**    
-*Required*: No    
-*Default*: all implemented interfaces, if any.   
-
-By default, the component is registered into the OSGi registry under all 
-directly implemented interfaces. If no interfaces are implemented, then the 
-component is not registered, but it still has a managed lifecycle, and may 
-have some dependencies. If you need to  explicitly define the list of 
-interfaces (or classes) under which the  component must be registered in the 
-OSGi registry, then use the *provides* attribute. You can also set this 
-property to an empty array of classes  if you don't want at all your component 
-to be exposed in the OSGi  registry (even if it implements some interfaces).
-
-----
-**`properties`**    
-*Required*: No    
-*Default*: --  
-
-the *properties" attribute enumerates the list of properties that are part of 
-the Service exposed by the component in the OSGi Registry. 
-Each property is defined using the @Property annotation, which represents a  
-key/value pair. When a value is actually an array of strings, 
-then the *values* attribute of the @Property annotation can be used. 
-This attribute  is not the only way to specify OSGi Service properties 
-(see Setting Service properties in the lifecycle section).
-
-----
-**`factoryMethod`**    
-*Required*: No    
-*Default*: --  
-
-This attribute refers to a static method name from the annotated class which 
-can be used to instantiate the component instance. Normally, DependencyManager 
-instantiates the component using its class name, and with the default 
-constructor of the class, but there are some cases where it is required to 
-take control of  how the component is created. For instance, this method may 
-be used to create the component as a dynamic proxy ...
-
-----
-**`factoryName`**    
-*Required*: No    
-*Default*: --  
- 
-This attribute is the identifier for a component factory. By default, a 
-component is automatically instantiated as a singleton when the bundle is 
-started, and when all required dependencies are satisfied. But when a 
-component must be created, configured, or disposed dynamically, and when 
-multiple instances of the same component are needed, a factoryName can  be 
-used. When you use this attribute, a *org.apache.felix.dm.runtime.api.ComponentFactory* 
-OSGi Service will be provided with a *dm.factory.name* service property matching your 
-specified factoryName attribute. The ComponentFactory will be provided once the 
-component bundle is started, even if required dependencies are not available, 
-and the ComponentFactory will be unregistered from the OSGi registry once the component 
-bundle is stopped or disposed using the *ComponentInstance.dispose()* method.
-
-----
-**`factoryConfigure`**    
-*Required*: No    
-*Default*: --  
-
-This attributes sets the *configure* method name to be called with the factory 
-configuration. This attribute only makes sense if the *factoryName* attribute 
-is used. If specified, then this attribute references a component callback 
-method, which is called for providing the configuration supplied by the 
-factory that instantiated this component. The current Service properties will 
-be also updated with all public properties (which don't start with a dot).
-
-Usage example:
-
-    :::java
-    /**
-     * This component will be activated once the bundle is started and when all required dependencies
-     * are available.
-     */
-    @Component
-    class X implements Z {
-        @ConfigurationDependency(pid="MyPid")
-        void configure(Dictionary conf) {
-             // Configure or reconfigure our service.
-        }
-    
-        @Start
-        void start() {
-            // Our component is starting and is about to be registered in the OSGi registry as a Z service.
-        }
-    
-        public void doService() {
-            // ...
-        }
-    }
-    
-
-Example using a factoryName, where the X component is instantiated/updated/disposed by another Y component:
-
-    :::java
-     import org.apache.felix.dm.runtime.api.ComponentFactory;
-     import org.apache.felix.dm.runtime.api.ComponentInstance;
-
-     @Component(factoryName="MyComponentFactory", factoryConfigure="configure")
-     class X implements Z {
-         void configure(Dictionary conf) {
-             // Configure or reconfigure our component. The conf is provided by 
-             // the factory, and all public properties (which don't
-             // start with a dot) are propagated with the Service
-             // properties eventually specified in the properties
-             // annotation attribute.
-         }
-    
-         @ServiceDependency
-         void bindOtherService(OtherService other) {
-             // store this require dependency
-         }
-    
-         @Start
-         void start() {
-             // Our component is starting and is about to be registered
-             // in the OSGi registry as a Z service.
-         }
-    
-         public void doService() {
-             // ... part of Z interface
-         }
-     }
-    
-     /**
-      * This class will instantiate some X component instances
-      */
-     @Component
-     class Y {
-         // This Set acts as a Factory API for creating X component instances.
-         @ServiceDependency(filter="(dm.factory.name=MyComponentFactory)")
-         ComponentFactory _XFactory; 
-    
-         @Start
-         void start() {
-             // Instantiate a X component instance
-             Dictionary x1 = new Hashtable() {{ put("foo", "bar1"); }};
-             ComponentInstance i1 = _XFactory.newInstance(x1);
-    
-             // Instantiate another X component instance
-             Dictionary x2 = new Hashtable() {{ put("foo", "bar2"); }};
-             ComponentInstance i2 = _XFactory.newInstance(x2);
-    
-             // Update the first X component instance
-             x1 = new Hashtable() {{ put("foo", "bar1_modified"); }};
-             i1.update(x1);
-    
-             // Destroy components
-             i1.dispose();
-             i2.dispose();
-         }
-    }
-