To register a service, an instance of the implementation class needs to be created and registered with the framework. Interactions with the framework are performed with an instance of
BundleContext—typically provided in the
BundleActivator.start method and stored for later use. The
*FeedParser classes from the previous chapter will be extended to support registration as a service instead of the Equinox extension registry.
A bundle's activator is a class that is instantiated and coupled to the lifetime of the bundle. When a bundle is started, if a manifest entry
Bundle-Activator exists, then the corresponding class is instantiated. As long as it implements the
BundleActivator interface, ...