|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjautil.avatar.AvatarsCacheHandler
public class AvatarsCacheHandler
An avatars cache handler provides access to a local cache for a potentially remote and dispersed collection of avatar definition data files.
Each cache is bound to a specific version of JASigning.
Each avatar is represented by a pair of cache entries:
a descriptor, represented here as an AvatarCacheDescriptor
,
and the cached copy of the original avatar data.
The contents of the descriptor include the avatar name and
the original source URL for the avatar data. The avatar data itself
is a JAR file containing the avatar definition files together with
an access class.
The obvious way to support this cache would be through the
standard Java caching mechanism, the JNLP Persistence Service.
However, that service seems not to be available to HTML applets
-- at least not automatically so: a typical applet dies a horrible
death as soon as it tries to use that service.
So this cache is implemented using the local file system: the descriptor
and data files for a given avatar AV
are held in the directory
.jasigning/avatars/AV
under the given user's base directory.
Constructor Summary | |
---|---|
AvatarsCacheHandler()
Constructs a new avatar cache handler. |
Method Summary | |
---|---|
AvatarCacheDescriptor |
ensureCached(java.lang.String av,
java.lang.String avurl)
Tries to ensure that the avatar cache contains an up-to-date pair of entries for the avatar with the given name and original data URL, returning the avatar cache descriptor if successful, or null
otherwise. |
java.lang.String |
getDataFileURL(AvatarCacheDescriptor desc)
Returns the data file URL for the avatar to which the given cache descriptor refers. |
boolean |
isCached(java.lang.String av,
java.lang.String url)
Determines whether the cache contains an (up-to-date) pair of entries for the avatar with the given name and original data URL. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AvatarsCacheHandler()
Method Detail |
---|
public boolean isCached(java.lang.String av, java.lang.String url)
public AvatarCacheDescriptor ensureCached(java.lang.String av, java.lang.String avurl)
null
otherwise. If necessary, a new pair of cache entries is created or an
existing stale data entry is refreshed.
public java.lang.String getDataFileURL(AvatarCacheDescriptor desc)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |