Reputation: 121
Is there a standard way of reading MANIFEST.MF key-value pairs from a fragment in OSGi?
Upvotes: 0
Views: 627
Reputation: 3176
Each fragment is represented in the OSGi framework with a Bundle object. If you call BundleContext.getBundles() the returned list will include both fragment, and non fragment bundle. If you search through the array to find the fragment you are interested in you can call the Bundle.getHeaders() method which will return a Hashtable containing the name value paris.
Upvotes: 3