-
public interface DownloadService2
Provides cache query services to JNLP applications. Together with methods inDownloadService
, this allows for advanced programmatic cache management.- Since:
- 6.0.18
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
DownloadService2.ResourceSpec
Specifies patterns for resource queries as arguments and holds results ingetCachedResources(javax.jnlp.DownloadService2.ResourceSpec)
andgetUpdateAvailableResources(javax.jnlp.DownloadService2.ResourceSpec)
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DownloadService2.ResourceSpec[]
getCachedResources(DownloadService2.ResourceSpec spec)
Returns all resources in the cache that match one of the specified resource specs.DownloadService2.ResourceSpec[]
getUpdateAvailableResources(DownloadService2.ResourceSpec spec)
Returns all resources in the cache that match one of the specified resource specs AND have an update available from their server.
-
-
-
Field Detail
-
ALL
static final int ALL
Matches all resources ingetCachedResources(javax.jnlp.DownloadService2.ResourceSpec)
andgetUpdateAvailableResources(javax.jnlp.DownloadService2.ResourceSpec)
.- See Also:
- Constant Field Values
-
APPLICATION
static final int APPLICATION
Matches applications ingetCachedResources(javax.jnlp.DownloadService2.ResourceSpec)
andgetUpdateAvailableResources(javax.jnlp.DownloadService2.ResourceSpec)
.- See Also:
- Constant Field Values
-
APPLET
static final int APPLET
Matches applets ingetCachedResources(javax.jnlp.DownloadService2.ResourceSpec)
andgetUpdateAvailableResources(javax.jnlp.DownloadService2.ResourceSpec)
.- See Also:
- Constant Field Values
-
EXTENSION
static final int EXTENSION
Matches extensions ingetCachedResources(javax.jnlp.DownloadService2.ResourceSpec)
andgetUpdateAvailableResources(javax.jnlp.DownloadService2.ResourceSpec)
.- See Also:
- Constant Field Values
-
JAR
static final int JAR
Matches JARs ingetCachedResources(javax.jnlp.DownloadService2.ResourceSpec)
andgetUpdateAvailableResources(javax.jnlp.DownloadService2.ResourceSpec)
.- See Also:
- Constant Field Values
-
IMAGE
static final int IMAGE
Matches image files ingetCachedResources(javax.jnlp.DownloadService2.ResourceSpec)
andgetUpdateAvailableResources(javax.jnlp.DownloadService2.ResourceSpec)
.- See Also:
- Constant Field Values
-
CLASS
static final int CLASS
Matches class files ingetCachedResources(javax.jnlp.DownloadService2.ResourceSpec)
andgetUpdateAvailableResources(javax.jnlp.DownloadService2.ResourceSpec)
.- See Also:
- Constant Field Values
-
-
Method Detail
-
getCachedResources
DownloadService2.ResourceSpec[] getCachedResources(DownloadService2.ResourceSpec spec)
Returns all resources in the cache that match one of the specified resource specs.
For supported patterns in the query arguments, seeDownloadService2.ResourceSpec
. The returnedResourceSpec
objects have specific URL and version properties (i.e. no patterns).- Parameters:
spec
- the spec to match resources against- Returns:
- all resources that match one of the specs
- Throws:
IllegalArgumentException
-
if the ResourceSpec is null, or
if the ResourceSpec contains a null or empty URL string, or
if the ResourceSpec contains invalid regular expressions.
if the ResourceSpec contains a type that is not one of:
ALL, APPLICATION, APPLET, EXTENSION, JAR, IMAGE, or CLASS.
-
getUpdateAvailableResources
DownloadService2.ResourceSpec[] getUpdateAvailableResources(DownloadService2.ResourceSpec spec) throws IOException
Returns all resources in the cache that match one of the specified resource specs AND have an update available from their server.
For supported patterns in the query arguments, seeDownloadService2.ResourceSpec
. The returnedResourceSpec
objects have specific URL and version properties (i.e. no patterns).
NOTE: This call may attempt HTTP GET request to check for update.- Parameters:
spec
- the spec to match resources against- Returns:
- all resources for which an update is available that match one of the specs
- Throws:
IOException
- if something went wrong during update checksIllegalArgumentException
-
if the ResourceSpec is null, or
if the ResourceSpec contains a null or empty URL string, or
if the ResourceSpec contains invalid regular expressions.
if the ResourceSpec contains a type that is not one of:
ALL, APPLICATION, APPLET, EXTENSION, JAR, IMAGE, or CLASS.
-
-