OSGi Design Patterns

This section lists a couple of design patterns as they can be applied in an OSGi context.

(Singleton) Service

Provides a service as long as its dependencies are resolved.

Aspect Service

Provides an aspect on top of a specific type of service.

Adapter Service

Provides an adapter for a specific type of service.

Resource Adapter Service

Provides an adapter for a specific type of resource.

Temporal Dependency

Provides a proxy that hides the service dynamics of a dependency, even if it disappears for a short time.

Null Object

Provides an implementation of an object that does nothing and can be used in the absence of the real object.

Whiteboard

Handles listeners by leveraging the OSGi service registry to publish and look them up.