Package org.jgrapes.osgi.core


package org.jgrapes.osgi.core
This package provides support for integrating JGrapes with OSGi services.

There are several ways in which JGrapes and OSGi can be integrated.

  • Provide libraries as OSGi bundle. This is done for all JGrapes libraries.

  • Write an OSGi bundle with an activator that adds one or more components to a JGrapes component tree. This is possible but not recommended as a general approach because

    • the component tree has to be made accessible in the OSGi service registry (not really a problem) and

    • the activator has to “know” where to insert the components in the tree, thus introducing a dependency of the bundle on the application and limiting the possibilities for reuse.

  • Use a variation of the “Whiteboard Pattern”.

This package provides the helper class ComponentCollector that simplifies the implementation of the third approach.