OSGi and Gravity Service Binder Tutorial
This tutorial creates successively more complex OSGi bundles to illustrate
most of the features and functionality offered by the OSGi framework. It
culminates by demonstrating how the Gravity Service Binder can be used to
greatly simplify creating OSGi applications.
- Example 1: A simple bundle that listens for
OSGi service events.
- Example 2: A bundle that implements a
- Example 2b: A bundle that implements
another variant of the dictionary service.
- Example 3: A bundle that implements a simple
client for the dictionary service provided by the bundles in
- Example 4: A bundle that implements a more
complex client for the dictionary service provided by the bundles in
- Example 5: A bundle that registers a more
complex spell check service that uses the dictionary service defined
in Example 2.
- Example 6: A bundle that implements a client
for the spell check service from Example 5; this bundle is nearly
identical to dictionary client in Example 4.
- Example 7: A bundle that re-implements the
spell check service of Example 5, but does so using the Gravity
Service Binder, which greatly reduces the complexity of the service.
Every file that is needed for the
tutorial is available in the tutorial.jar JAR file,
including an Ant build script to build everything in one step.