public interface DownloadService
DownloadService service allows an application
to control how its own resources are cached, to determine
which of its resources are currently cached, to force resources
to be cached, and to remove resources from the cache. The JNLP
Client is responsible for providing a specific implementation of
this service.| Modifier and Type | Method | Description |
|---|---|---|
DownloadServiceListener |
getDefaultProgressWindow() |
Return a default
DownloadServiceListener implementation which, when passed to
a load method, should pop up and update a progress window as the load
progresses. |
boolean |
isExtensionPartCached(java.net.URL ref,
java.lang.String version,
java.lang.String part) |
Returns
true if the given part of the given
extension is cached, and the extension and part are
mentioned in the JNLP file for the application. |
boolean |
isExtensionPartCached(java.net.URL ref,
java.lang.String version,
java.lang.String[] parts) |
Returns
true if the given parts of the given
extension are cached, and the extension and parts are
mentioned in the JNLP file for the application. |
boolean |
isPartCached(java.lang.String part) |
Returns
true if the part referred to by the
given string is cached, and that part is
mentioned in the JNLP file for the application. |
boolean |
isPartCached(java.lang.String[] parts) |
Returns
true if the parts referred to by the
given array are cached, and those parts are
mentioned in the JNLP file for the application. |
boolean |
isResourceCached(java.net.URL ref,
java.lang.String version) |
Returns
true if the resource referred to by the
given URL and version is cached, and that resource is either
mentioned in the calling applications JNLP file, is within the
codebase of the calling applications JNLP file, or the
calling application has been granted all-permissions. |
void |
loadExtensionPart(java.net.URL ref,
java.lang.String version,
java.lang.String[] parts,
DownloadServiceListener progress) |
Downloads the given parts of the given extension, if the parts
and the extension are mentioned in the JNLP file for the
application.
|
void |
loadExtensionPart(java.net.URL ref,
java.lang.String version,
java.lang.String part,
DownloadServiceListener progress) |
Downloads the given part of the given extension, if the part
and the extension are mentioned in the JNLP file for the
application.
|
void |
loadPart(java.lang.String[] parts,
DownloadServiceListener progress) |
Downloads the given parts, if the parts are mentioned in
the JNLP file for the application.
|
void |
loadPart(java.lang.String part,
DownloadServiceListener progress) |
Downloads the given part, if the part is mentioned in
the JNLP file for the application.
|
void |
loadResource(java.net.URL ref,
java.lang.String version,
DownloadServiceListener progress) |
Downloads the given resource, if the resource is either mentioned
in the calling applications JNLP file, is within the codebase
of the calling applications JNLP file, or if the calling application
has been granted all-permissions.
|
void |
removeExtensionPart(java.net.URL ref,
java.lang.String version,
java.lang.String part) |
Removes the given part of the given extension from the cache,
if the part and the extension are mentioned in the JNLP file
for the application.
|
void |
removeExtensionPart(java.net.URL ref,
java.lang.String version,
java.lang.String[] parts) |
Removes the given parts of the given extension from the cache,
if the parts and the extension are mentioned in the JNLP file
for the application.
|
void |
removePart(java.lang.String part) |
Removes the given part from the cache, if the part
is mentioned in the JNLP file for the application.
|
void |
removePart(java.lang.String[] parts) |
Removes the given parts from the cache, if the parts
are mentioned in the JNLP file for the application.
|
void |
removeResource(java.net.URL ref,
java.lang.String version) |
Removes the given resource from the cache, if the resource
is either mentioned in the calling applications JNLP file,
is within the codebase of the calling applications JNLP file,
or if the calling application has been granted all-permissions.
|
boolean isResourceCached(java.net.URL ref,
java.lang.String version)
true if the resource referred to by the
given URL and version is cached, and that resource is either
mentioned in the calling applications JNLP file, is within the
codebase of the calling applications JNLP file, or the
calling application has been granted all-permissions.
.ref - The URL for the resource.version - The version string, or null for
no version.true if the above conditions are
met, and false otherwise.boolean isPartCached(java.lang.String part)
true if the part referred to by the
given string is cached, and that part is
mentioned in the JNLP file for the application.part - The name of the part.true if the above conditions are
met, and false otherwise.boolean isPartCached(java.lang.String[] parts)
true if the parts referred to by the
given array are cached, and those parts are
mentioned in the JNLP file for the application.parts - An array of part names.true if the above conditions are
met, and false otherwise.boolean isExtensionPartCached(java.net.URL ref,
java.lang.String version,
java.lang.String part)
true if the given part of the given
extension is cached, and the extension and part are
mentioned in the JNLP file for the application.ref - The URL for the resource.version - The version string, or null for
no version.part - The name of the part.true if the above conditions are
met, and false otherwise.boolean isExtensionPartCached(java.net.URL ref,
java.lang.String version,
java.lang.String[] parts)
true if the given parts of the given
extension are cached, and the extension and parts are
mentioned in the JNLP file for the application.ref - The URL for the resource.version - The version string, or null for
no version.parts - An array of part names.true if the above conditions are
met, and false otherwise.void loadResource(java.net.URL ref,
java.lang.String version,
DownloadServiceListener progress)
throws java.io.IOException
ref - The URL for the resource.version - The version string, or null for
no version.progress - Download progress callback object.java.io.IOExceptionvoid loadPart(java.lang.String part,
DownloadServiceListener progress)
throws java.io.IOException
part - The name of the part.progress - Download progress callback object.java.io.IOExceptionvoid loadPart(java.lang.String[] parts,
DownloadServiceListener progress)
throws java.io.IOException
parts - An array of part names.progress - Download progress callback object.java.io.IOExceptionvoid loadExtensionPart(java.net.URL ref,
java.lang.String version,
java.lang.String part,
DownloadServiceListener progress)
throws java.io.IOException
ref - The URL for the resource.version - The version string, or null for
no version.part - The name of the part.progress - Download progress callback object.java.io.IOExceptionvoid loadExtensionPart(java.net.URL ref,
java.lang.String version,
java.lang.String[] parts,
DownloadServiceListener progress)
throws java.io.IOException
ref - The URL for the resource.version - The version string, or null for
no version.parts - An array of part names to load.progress - Download progress callback object.java.io.IOExceptionvoid removeResource(java.net.URL ref,
java.lang.String version)
throws java.io.IOException
ref - The URL for the resource.version - The version string, or null for
no version.java.io.IOExceptionvoid removePart(java.lang.String part)
throws java.io.IOException
part - The name of the part.java.io.IOExceptionvoid removePart(java.lang.String[] parts)
throws java.io.IOException
parts - An array of part names.java.io.IOExceptionvoid removeExtensionPart(java.net.URL ref,
java.lang.String version,
java.lang.String part)
throws java.io.IOException
ref - The URL for the resource.version - The version string, or null for
no version.part - The name of the part.java.io.IOExceptionvoid removeExtensionPart(java.net.URL ref,
java.lang.String version,
java.lang.String[] parts)
throws java.io.IOException
ref - The URL for the resource.version - The version string, or null for
no version.parts - An array of part names.java.io.IOExceptionDownloadServiceListener getDefaultProgressWindow()
DownloadServiceListener implementation which, when passed to
a load method, should pop up and update a progress window as the load
progresses.DownloadServiceListener object representing a download progress
listener.Copyright © 1998, 2025, Oracle and/or its affiliates. All rights reserved.