- java.lang.Object
-
- javax.jnlp.DownloadService2.ResourceSpec
-
- Enclosing interface:
- DownloadService2
public static class DownloadService2.ResourceSpec extends Object
Specifies patterns for resource queries as arguments and holds results inDownloadService2.getCachedResources(javax.jnlp.DownloadService2.ResourceSpec)
andDownloadService2.getUpdateAvailableResources(javax.jnlp.DownloadService2.ResourceSpec)
.
For theurl
andversion
properties, standard regular expressions as documented in {code java.util.regex} are supported.
-
-
Constructor Summary
Constructors Constructor Description ResourceSpec(String url, String version, int type)
Creates a new ResourceSpec instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getExpirationDate()
Returns the time of expiration of the resource.long
getLastModified()
Returns the time of last modification of the resource.long
getSize()
Returns the size of a resource.int
getType()
Returns the type of this resource.String
getUrl()
Returns the URL of this resource.String
getVersion()
Returns the version of this resource.
-
-
-
Constructor Detail
-
ResourceSpec
public ResourceSpec(String url, String version, int type)
Creates a new ResourceSpec instance.- Parameters:
url
- the URL patternversion
- the version patterntype
- the resource type. This should be one of the following constants defined in DownloadService2: ALL, APPLICATION, APPLET, EXTENSION, JAR, IMAGE, or CLASS.
-
-
Method Detail
-
getUrl
public String getUrl()
Returns the URL of this resource.- Returns:
- the URL of this resource
-
getVersion
public String getVersion()
Returns the version of this resource.- Returns:
- the version of this resource
-
getType
public int getType()
Returns the type of this resource.- Returns:
- the type of this resource
-
getSize
public long getSize()
Returns the size of a resource. This is only useful for ResourceSpecs that have been returned as a result ofDownloadService2.getCachedResources(javax.jnlp.DownloadService2.ResourceSpec)
orDownloadService2.getUpdateAvailableResources(javax.jnlp.DownloadService2.ResourceSpec)
.- Returns:
- the size of a resource
-
getLastModified
public long getLastModified()
Returns the time of last modification of the resource.
The returned value has the same semantics as the return value of System.currentTimeMillis().
A value of0
means unknown.- Returns:
- the time of last modification of the resource
-
getExpirationDate
public long getExpirationDate()
Returns the time of expiration of the resource.
The returned value has the same semantics as the return value of System.currentTimeMillis().
A value of0
means unknown.- Returns:
- the time of expiration of the resource
-
-