The Resource Provider Service detects the resources exported by bundles or provides the location of resources on the file system for use across the OSGi framework, and enables bundles that need such resources, to import them.
Overview
The Resource Provider service is registered under the com.prosyst.util.resprovider.ResourceProvider interface. It detects the resources exported by bundles or provides the location of resources on the file system for use across the OSGi framework, and enables bundles that need such resources, to import them.
All bundles that need to use resources provided by other bundles or located on the local file system must get the Resource Provider service and use its methods for resource management.
See Importing Resources for more information.
A bundle exporting resources does NOT need to communicate directly with the Resource Provider service. It only needs to describe the resources in an XML file, and then specify the location of the file in its manifest. Resources that are located on the local file system can be added to or removed from the Resource Provider's store through its methods.
See Exporting Resources for more information.
The Resource Provider service listens for the appearance of bundles with the Resource-Config manifest header. When such a bundle is installed, the Resource Provider parses its resource XML, and stores the found resources in a hashtable. When another bundle requests a resource, it is taken from the Resource Provider's hashtable of resources. When a bundle providing resources is updated or uninstalled, its resource records are updated or removed from the Resource Provider's hashtable.
Registering Bundle
This service is registered by Util Resource Provider Bundle.