netx.jnlp.cache
Class CacheEntry
java.lang.Object
netx.jnlp.cache.CacheEntry
public class CacheEntry
extends java.lang.Object
Describes an entry in the cache.
CacheEntry(URL location, Version version) - Create a CacheEntry for the resources specified as a remote
URL.
|
long | getLastUpdated() - Returns the time in the local system clock that the file was
most recently checked for an update.
|
URL | getLocation() - Returns the remote location this entry caches.
|
(package private) void | initialize(URLConnection connection) - Initialize the cache entry data from a connection to the
remote resource (does not store data).
|
boolean | isCached() - Returns true if the cache has a local copy of the contents
of the URL matching the specified version string.
|
boolean | isCurrent(URLConnection connection) - Returns whether there is a version of the URL contents in
the cache and it is up to date.
|
void | setLastUpdated(long updatedTime) - Sets the time in the local system clock that the file was
most recently checked for an update.
|
protected void | store() - Save the current information for the cache entry.
|
CacheEntry
public CacheEntry(URL location,
Version version)
Create a CacheEntry for the resources specified as a remote
URL.
location
- the remote resource locationversion
- the version of the resource
getLastUpdated
public long getLastUpdated()
Returns the time in the local system clock that the file was
most recently checked for an update.
getLocation
public URL getLocation()
Returns the remote location this entry caches.
initialize
(package private) void initialize(URLConnection connection)
Initialize the cache entry data from a connection to the
remote resource (does not store data).
isCached
public boolean isCached()
Returns true if the cache has a local copy of the contents
of the URL matching the specified version string.
- true if the resource is in the cache
isCurrent
public boolean isCurrent(URLConnection connection)
Returns whether there is a version of the URL contents in
the cache and it is up to date. This method may not return
immediately.
connection
- a connection to the remote URL
- whether the cache contains the version
setLastUpdated
public void setLastUpdated(long updatedTime)
Sets the time in the local system clock that the file was
most recently checked for an update.
store
protected void store()
Save the current information for the cache entry.