|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.prefs.impl.PreferencesManager
public class PreferencesManager
This activator registers itself as a service factory for the preferences service.
Field Summary | |
---|---|
protected BundleContext |
context
The bundle context. |
protected BackingStore |
defaultStore
The default store which is used if no service can be found. |
protected ServiceTracker |
logTracker
The service tracker for the log service. |
protected Map |
services
The map of already created services. |
protected ServiceTracker |
storeTracker
The backing store service tracker. |
protected int |
storeTrackingCount
Tracking count for the store tracker to detect changes. |
Constructor Summary | |
---|---|
PreferencesManager()
|
Method Summary | |
---|---|
void |
bundleChanged(BundleEvent event)
|
protected void |
cleanupStore(BackingStore store)
Clean up the store and remove preferences for deleted bundles. |
Object |
getService(Bundle bundle,
ServiceRegistration reg)
|
BackingStore |
getStore()
Return the current backing store. |
protected void |
log(int level,
String message,
Throwable t)
|
protected void |
save(PreferencesServiceImpl service)
Save all preferences for this service. |
void |
start(BundleContext context)
|
void |
stop(BundleContext context)
|
void |
ungetService(Bundle bundle,
ServiceRegistration reg,
Object s)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Map services
protected BundleContext context
protected ServiceTracker storeTracker
protected ServiceTracker logTracker
protected BackingStore defaultStore
protected int storeTrackingCount
Constructor Detail |
---|
public PreferencesManager()
Method Detail |
---|
public void bundleChanged(BundleEvent event)
bundleChanged
in interface BundleListener
BundleListener.bundleChanged(org.osgi.framework.BundleEvent)
public void start(BundleContext context) throws Exception
start
in interface BundleActivator
Exception
BundleActivator.start(org.osgi.framework.BundleContext)
public void stop(BundleContext context) throws Exception
stop
in interface BundleActivator
Exception
BundleActivator.stop(org.osgi.framework.BundleContext)
public Object getService(Bundle bundle, ServiceRegistration reg)
getService
in interface ServiceFactory
ServiceFactory.getService(org.osgi.framework.Bundle, org.osgi.framework.ServiceRegistration)
public void ungetService(Bundle bundle, ServiceRegistration reg, Object s)
ungetService
in interface ServiceFactory
ServiceFactory.ungetService(org.osgi.framework.Bundle, org.osgi.framework.ServiceRegistration, java.lang.Object)
protected void save(PreferencesServiceImpl service)
service
- protected void log(int level, String message, Throwable t)
public BackingStore getStore()
BackingStoreManager
getStore
in interface BackingStoreManager
BackingStoreManager.getStore()
protected void cleanupStore(BackingStore store)
store
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |