The poor man introduction to OSGi
In a few words, OSGi is a specification for a platform adding
- a module layer
- a lifecycle layer
- a service layer
to the Java platform.
Module Layer
The module layer allows developers to create truly modular, component based software. A module has a few, important, characteristics:
- it clearly defines its boundaries: which classes are of private use only, which classes can be used in other modules
- it clearly defines its dependencies
In the OSGi terminology, the term bundle is used to designate a module.
Module Layer
Bundles are subject to a lifecycle. Bundles can be installed, upgraded and removed at runtime; when installed, they can be manually or programmatically started and stopped.
Service Layer
Bundles can provide services. The OSGi platform contains a Service Registry when bundles can register and look up for services.
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.
