|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.prefs.impl.StreamBackingStoreImpl
public abstract class StreamBackingStoreImpl
This is an abstract implementation of a backing store which uses streams to read/write the preferences and stores a complete preferences tree in a single stream.
Field Summary | |
---|---|
protected org.osgi.framework.BundleContext |
bundleContext
The bundle context. |
Constructor Summary | |
---|---|
StreamBackingStoreImpl(org.osgi.framework.BundleContext context)
|
Method Summary | |
---|---|
protected abstract void |
checkAccess()
This method is invoked to check if the backing store is accessible right now. |
protected abstract java.io.OutputStream |
getOutputStream(PreferencesDescription desc)
Get the output stream to write the preferences. |
protected boolean |
hasChanges(PreferencesImpl prefs)
Has the tree changes? |
protected void |
read(PreferencesImpl prefs,
java.io.InputStream is)
Read the preferences recursively from the input stream. |
protected void |
readPreferences(PreferencesImpl prefs,
java.io.InputStream in)
Load this preferences from an input stream. |
void |
store(PreferencesImpl prefs)
Store the current preferences and its children in the backing store. |
void |
update(PreferencesImpl prefs)
Update the current preferences and its children from the backing store. |
protected void |
write(PreferencesImpl prefs,
java.io.OutputStream os)
Write the preferences recursively to the output stream. |
protected void |
writePreferences(PreferencesImpl prefs,
java.io.OutputStream out)
Save this preferences to an output stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.felix.prefs.BackingStore |
---|
availableBundles, load, loadAll, remove |
Field Detail |
---|
protected final org.osgi.framework.BundleContext bundleContext
Constructor Detail |
---|
public StreamBackingStoreImpl(org.osgi.framework.BundleContext context)
Method Detail |
---|
protected abstract void checkAccess() throws org.osgi.service.prefs.BackingStoreException
org.osgi.service.prefs.BackingStoreException
protected abstract java.io.OutputStream getOutputStream(PreferencesDescription desc) throws java.io.IOException
java.io.IOException
public void store(PreferencesImpl prefs) throws org.osgi.service.prefs.BackingStoreException
BackingStore
store
in interface BackingStore
prefs
- The preferences.
org.osgi.service.prefs.BackingStoreException
BackingStore.store(org.apache.felix.prefs.PreferencesImpl)
protected boolean hasChanges(PreferencesImpl prefs)
public void update(PreferencesImpl prefs) throws org.osgi.service.prefs.BackingStoreException
BackingStore
update
in interface BackingStore
org.osgi.service.prefs.BackingStoreException
BackingStore.update(org.apache.felix.prefs.PreferencesImpl)
protected void write(PreferencesImpl prefs, java.io.OutputStream os) throws java.io.IOException
prefs
- os
-
java.io.IOException
protected void read(PreferencesImpl prefs, java.io.InputStream is) throws java.io.IOException
prefs
- is
-
java.io.IOException
protected void readPreferences(PreferencesImpl prefs, java.io.InputStream in) throws java.io.IOException
java.io.IOException
protected void writePreferences(PreferencesImpl prefs, java.io.OutputStream out) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |