Interface PersistenceService

public interface PersistenceService

PersistenceService provides methods for storing data
locally on the client system, even for applications that are running
in the untrusted execution environment. The service is somewhat
similar to that which the cookie mechanism provides to HTML-based
applications.

Each entry in the persistence data store is named with a URL.
This provides a similar hierarchical structure as a traditional file
system.

An application is only allowed to access data stored with a URL that
is based on its codebase. For example, given the codebase
http://www.mysite.com/apps/App1/, the application
would be allowed to access the data at the associated URLs:

http://www.mysite.com/apps/App1/

http://www.mysite.com/apps/

http://www.mysite.com/

This scheme allows sharing of data between different applications from
the same host. For example, if another application is located at
http://www.mysite.com/apps/App2/, then they can share data
between them in the http://www.mysite.com/ and
http://www.mysite.com/apps/ directories.

A JNLP client should track the amount of storage that a given
application uses. A PersistenceService implementation
provides methods to get the current storage usage and limits and to
request more storage. Storage is allocated on a per file basis, but a
JNLP Client will typically grant or deny the request based on the total
storage is use by an application.

Data stored using this mechanism is intended to be a local copy of
data stored on a remote server. The individual entries can be
tagged as either cached, meaning the server has an up-to-date
copy, dirty, meaning the server does not have an up-to-date
copy, or temporary, meaning that the file can always be
recreated.