public class OSGiPreferencesServiceManager
extends java.lang.Object
Class used to manage OSGi Preferences Service. Creates a new OSGiPreferencesServiceImpl object for every bundle that gets the Preferences Service. When a bundle ungets the Preference Service, it's preferences are flushed to disk.
Also deletes saved preferences for bundles which are uninstalled.
| Constructor and Description |
|---|
OSGiPreferencesServiceManager(BundleContext context) |
| Modifier and Type | Method and Description |
|---|---|
void |
bundleChanged(BundleEvent event)
If a bundle is uninstalled, delete all of it's preferences from the disk.
|
PreferencesService |
getService(Bundle bundle,
<any> registration)
Creates a new OSGiPreferencesServiceImpl for each bundle.
|
protected void |
removePrefs(java.lang.String qualifier) |
void |
ungetService(Bundle bundle,
<any> registration,
PreferencesService service)
Flush the bundle's preferences.
|
public OSGiPreferencesServiceManager(BundleContext context)
public PreferencesService getService(Bundle bundle, <any> registration)
public void ungetService(Bundle bundle,
<any> registration,
PreferencesService service)
public void bundleChanged(BundleEvent event)
protected void removePrefs(java.lang.String qualifier)
throws BackingStoreException
BackingStoreException