Declarative Services (DS) is a component model that simplifies the creation of components that publish and/or reference OSGi Services.
Declarative Services (DS) is a component model that simplifies the creation of components that publish and/or reference OSGi Services. It was first defined in OSGi Release 4.0 and is inspired by an earlier model known as service binder by Richard Hall and Humberto Cervantes.
Its main features are:
- Declarative : no need to write explicit code to publish or consume services.
- Lazy : components that publish services are delayed, meaning that the service implementation class is not loaded or instantiated until the service is actually requested by a client.
- Lifecycle: components have their own lifecycle (i.e. activation and deactivation), bounded by the lifecycle of the bundle in which they are defined.
- Configuration: components can automatically receive configuration data from Configuration Admin.