WebObjects 5.4.2

com.webobjects.eoapplication.client
Class EORemoteStorageDefaults

java.lang.Object
  extended by com.webobjects.eoapplication.EODefaults
      extended by com.webobjects.eoapplication.client.EORemoteStorageDefaults
All Implemented Interfaces:
NSDisposable

public class EORemoteStorageDefaults
extends EODefaults

EORemoteStorageDefaults works together with the server side of a Java Client application to manage the defaults of an application: When the client starts up, it tries to receive values from the distribution context on the server side, and when the application terminates, it asks the distribution context to store all the persistent values. The distribution context in turn sends out notifications to read or write the default values, so you can register for these notifications on the server side and implement your own storage mechanism (for example to store the user defaults in the database).

See Also:
EODefaults

Field Summary
 
Fields inherited from class com.webobjects.eoapplication.EODefaults
DefaultsKey, LoadUserDefaultsNotification, SaveUserDefaultsNotification
 
Constructor Summary
EORemoteStorageDefaults()
          Creates a new defaults manager object.
 
Method Summary
protected  NSDictionary loadPersistentValues()
          Tries to load the persistent user defaults from the server.
protected  void savePersistentValues(NSDictionary values)
          Saves the persistent user defaults by asking the server to store them.
 
Methods inherited from class com.webobjects.eoapplication.EODefaults
allValues, clearAllValues, dispose, flushDefaultsToPersistentStore, setPersistentValueForKey, setTransientValueForKey, valueForKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EORemoteStorageDefaults

public EORemoteStorageDefaults()
Creates a new defaults manager object.

Method Detail

loadPersistentValues

protected NSDictionary loadPersistentValues()
Tries to load the persistent user defaults from the server. On the server side you need to register for EODefaults.LoadUserDefaultsNotification notifications to fill in the values, otherwise nothing happens.

Overrides:
loadPersistentValues in class EODefaults
Returns:
the defaults loaded
See Also:
EORemoteStorageDefaults.savePersistentValues(NSDictionary values)

savePersistentValues

protected void savePersistentValues(NSDictionary values)
Saves the persistent user defaults by asking the server to store them. On the server side you need to register for EODefaults.SaveUserDefaultsNotification notifications to save the values, otherwise nothing happens.

Overrides:
savePersistentValues in class EODefaults
Parameters:
values - the persistent values to save
See Also:
EORemoteStorageDefaults.loadPersistentValues()

Last updated June 2008

Copyright © 2000-2008 Apple Inc.