|
||||||||||
| 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 BundleContext |
bundleContext
The bundle context. |
| Constructor Summary | |
|---|---|
StreamBackingStoreImpl(BundleContext context)
|
|
| Method Summary | |
|---|---|
protected abstract void |
checkAccess()
This method is invoked to check if the backing store is accessible right now. |
protected abstract 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,
InputStream is)
Read the preferences recursively from the input stream. |
protected void |
readPreferences(PreferencesImpl prefs,
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,
OutputStream os)
Write the preferences recursively to the output stream. |
protected void |
writePreferences(PreferencesImpl prefs,
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 BundleContext bundleContext
| Constructor Detail |
|---|
public StreamBackingStoreImpl(BundleContext context)
| Method Detail |
|---|
protected abstract void checkAccess()
throws BackingStoreException
BackingStoreException
protected abstract OutputStream getOutputStream(PreferencesDescription desc)
throws IOException
IOException
public void store(PreferencesImpl prefs)
throws BackingStoreException
BackingStore
store in interface BackingStoreprefs - The preferences.
BackingStoreExceptionBackingStore.store(org.apache.felix.prefs.PreferencesImpl)protected boolean hasChanges(PreferencesImpl prefs)
public void update(PreferencesImpl prefs)
throws BackingStoreException
BackingStore
update in interface BackingStoreBackingStoreExceptionBackingStore.update(org.apache.felix.prefs.PreferencesImpl)
protected void write(PreferencesImpl prefs,
OutputStream os)
throws IOException
prefs - os -
IOException
protected void read(PreferencesImpl prefs,
InputStream is)
throws IOException
prefs - is -
IOException
protected void readPreferences(PreferencesImpl prefs,
InputStream in)
throws IOException
IOException
protected void writePreferences(PreferencesImpl prefs,
OutputStream out)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||