|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.gnu.glib.Struct
org.gnu.glib.GObject
org.gnu.gconf.ConfClient
public class ConfClient
ConfClient provides a client-side cache for a specified list of directories your're interested in. You can preload entire directories into cache to enhance performance. It also provides events when a value changes.
| Method Summary | |
|---|---|
void |
addDirectory(java.lang.String dir,
ConfClientPreloadType type)
Add a directory to the list of directories the ConfClient will watch. |
void |
addListener(ConfClientListener listener,
java.lang.String nameSpace)
Register an object to handle notify events. |
void |
clearCache()
If you know you're done reading values for a while you can blow away the cache. |
boolean |
dirExists(java.lang.String dir)
Check to see if a directory exists in the GConf database. |
ConfValue |
get(java.lang.String key)
Get the value of a configuration key. |
java.util.List |
getAllDirs(java.lang.String dir)
Get a list of the subdirectories in the provided directory. |
java.util.List |
getAllEntries(java.lang.String dir)
Get a list of all ConfEntries in the provided direcotry. |
boolean |
getBoolean(java.lang.String key)
Request the boolean value stored at the provided key. |
ConfValue |
getDefaultFromSchema(java.lang.String key)
Return the default value stored in the key's schema, if the key has a schema associated and the schema exists and the schema contains a default value. |
double |
getDouble(java.lang.String key)
Request the double value stored at the provided key. |
ConfEntry |
getEntry(java.lang.String key,
java.lang.String locale,
boolean useSchemaDefault)
Obtain the full ConfEntry for a value. |
static ConfClient |
getInstance()
Method to get the default ConfClient |
int |
getInt(java.lang.String key)
Request the int value stored at the provided key. |
java.lang.Object[] |
getList(java.lang.String key,
ConfValueType listType)
Request the object array stored at the key. |
ConfSchema |
getSchema(java.lang.String key)
Request the ConfSchema value stored at the provided key. |
java.lang.String |
getString(java.lang.String key)
Request the String value stored at the provided key. |
void |
notifyCallback()
|
void |
preload(java.lang.String directory,
ConfClientPreloadType type)
Preload a directory. |
void |
removeDirectory(java.lang.String dir)
Remove a directory from the list created with addDirectory. |
void |
removeListener(ConfClientListener listener,
java.lang.String nameSpace)
Removes a listener. |
void |
set(java.lang.String key,
ConfValue value)
Set the value of a configuration key. |
boolean |
setBoolean(java.lang.String key,
boolean value)
Change the value stored at the provided key to the provided boolean value. |
boolean |
setDouble(java.lang.String key,
double value)
Change the value stored at the provided key to the provided double value. |
boolean |
setInt(java.lang.String key,
int value)
Change the value stored at the provided key to the provided int value. |
boolean |
setList(java.lang.String key,
ConfValueType listType,
java.util.List value)
|
boolean |
setSchema(java.lang.String key,
ConfSchema value)
Change the value stored at the provided key to the provided ConfSchema value. |
boolean |
setString(java.lang.String key,
java.lang.String value)
Change the value stored at the provided key to the provided String value. |
void |
suggestSync()
Suggest to gconfd that you've just finished a block of changes and it would be an optimal time to sync to permanent storage. |
void |
t()
|
boolean |
unset(java.lang.String key)
Unsets the value of the provided key. |
| Methods inherited from class org.gnu.glib.GObject |
|---|
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, collect, freezeNotify, getBooleanProperty, getData, getDoubleProperty, getEventListenerClass, getEventType, getFloatProperty, getGObjectFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getPixbufProperty, getProperty, getStringProperty, hasProperty, notify, removeEventHandler, removeListener, setBooleanProperty, setData, setDoubleProperty, setFloatProperty, setIntProperty, setJavaObjectProperty, setLongProperty, setPixbufProperty, setProperty, setStringProperty, thawNotify |
| Methods inherited from class org.gnu.glib.Struct |
|---|
equals, getHandle, getNullHandle, hashCode |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ConfClient getInstance()
public void addDirectory(java.lang.String dir,
ConfClientPreloadType type)
throws ConfException
dir - type -
ConfException
public void removeDirectory(java.lang.String dir)
throws ConfException
dir -
ConfException
public void addListener(ConfClientListener listener,
java.lang.String nameSpace)
throws ConfException
ConfExceptionConfClientListener
public void removeListener(ConfClientListener listener,
java.lang.String nameSpace)
addListener(ConfClientListener, String)public void clearCache()
public void preload(java.lang.String directory,
ConfClientPreloadType type)
throws ConfException
directory - The directory to loadtype - How to preload the directory.
ConfException
public void set(java.lang.String key,
ConfValue value)
throws ConfException
key - value -
ConfException
public ConfValue get(java.lang.String key)
throws ConfException
key -
ConfException
public ConfEntry getEntry(java.lang.String key,
java.lang.String locale,
boolean useSchemaDefault)
throws ConfException
key - locale - useSchemaDefault -
ConfException
public ConfValue getDefaultFromSchema(java.lang.String key)
throws ConfException
key -
ConfException
public boolean unset(java.lang.String key)
throws ConfException
key -
ConfException
public java.util.List getAllEntries(java.lang.String dir)
throws ConfException
dir -
ConfException
public java.util.List getAllDirs(java.lang.String dir)
throws ConfException
dir -
ConfException
public void suggestSync()
throws ConfException
ConfException
public boolean dirExists(java.lang.String dir)
throws ConfException
dir -
ConfException
public double getDouble(java.lang.String key)
throws ConfException
key -
ConfException
public int getInt(java.lang.String key)
throws ConfException
key -
ConfException
public java.lang.String getString(java.lang.String key)
throws ConfException
key -
ConfException
public boolean getBoolean(java.lang.String key)
throws ConfException
key -
ConfException
public ConfSchema getSchema(java.lang.String key)
throws ConfException
key -
ConfException
public java.lang.Object[] getList(java.lang.String key,
ConfValueType listType)
throws ConfException
key - listType -
ConfException
public boolean setDouble(java.lang.String key,
double value)
throws ConfException
key - value -
ConfException
public boolean setInt(java.lang.String key,
int value)
throws ConfException
key - value -
ConfException
public boolean setString(java.lang.String key,
java.lang.String value)
throws ConfException
key - value -
ConfException
public boolean setBoolean(java.lang.String key,
boolean value)
throws ConfException
key - value -
ConfException
public boolean setSchema(java.lang.String key,
ConfSchema value)
throws ConfException
key - value -
ConfException
public boolean setList(java.lang.String key,
ConfValueType listType,
java.util.List value)
throws ConfException
ConfExceptionpublic void notifyCallback()
public void t()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||