netx.jnlp.services

Class XDownloadService

Implemented Interfaces:
javax.jnlp.DownloadService

(package private) class XDownloadService
extends java.lang.Object
implements javax.jnlp.DownloadService

The BasicService JNLP service.
Version:
$Revision: 1.7 $
Author:
Jon A. Maxwell (JAM) - initial author

Constructor Summary

XDownloadService()

Method Summary

javax.jnlp.DownloadServiceListener
getDefaultProgressWindow()
Returns a listener that will automatically display download progress to the user.
boolean
isExtensionPartCached(URL ref, String version, String part)
Returns whether the part in an extension (specified by the url and version) is cached locally.
boolean
isExtensionPartCached(URL ref, String version, String[] parts)
Returns whether the parts in an extension (specified by the url and version) are cached locally.
boolean
isPartCached(String part)
Returns whether the part of the calling application is cached locally.
boolean
isPartCached(String[] parts)
Returns whether all of the parts of the calling application are cached locally.
boolean
isResourceCached(URL ref, String version)
Returns whether the resource is cached locally.
void
loadExtensionPart(URL ref, String version, String part, javax.jnlp.DownloadServiceListener progress)
Downloads a part of an extension.
void
loadExtensionPart(URL ref, String version, String[] parts, javax.jnlp.DownloadServiceListener progress)
Downloads the parts of an extension.
void
loadPart(String part, javax.jnlp.DownloadServiceListener progress)
Downloads the part.
void
loadPart(String[] parts, javax.jnlp.DownloadServiceListener progress)
Downloads the parts.
void
loadResource(URL ref, String version, javax.jnlp.DownloadServiceListener progress)
Downloads a resource.
void
removeExtensionPart(URL ref, String version, String part)
Notify the system that an extension's part is no longer important to cache.
void
removeExtensionPart(URL ref, String version, String[] parts)
Notify the system that an extension's parts are no longer important to cache.
void
removePart(String part)
Notifies the system that a part is no longer important to cache.
void
removePart(String[] parts)
Notifies the system that the parts is no longer important to cache.
void
removeResource(URL ref, String version)
Notifies the system that the resource is no longer important to cache.

Constructor Details

XDownloadService

protected XDownloadService()

Method Details

getDefaultProgressWindow

public javax.jnlp.DownloadServiceListener getDefaultProgressWindow()
Returns a listener that will automatically display download progress to the user.

isExtensionPartCached

public boolean isExtensionPartCached(URL ref,
                                     String version,
                                     String part)
Returns whether the part in an extension (specified by the url and version) is cached locally.

isExtensionPartCached

public boolean isExtensionPartCached(URL ref,
                                     String version,
                                     String[] parts)
Returns whether the parts in an extension (specified by the url and version) are cached locally.

isPartCached

public boolean isPartCached(String part)
Returns whether the part of the calling application is cached locally. If called by code specified by an extension descriptor, the specified part refers to the extension not the application.

isPartCached

public boolean isPartCached(String[] parts)
Returns whether all of the parts of the calling application are cached locally. If called by code in an extension, the part refers the the part of the extension not the application.

isResourceCached

public boolean isResourceCached(URL ref,
                                String version)
Returns whether the resource is cached locally. This method only returns true if the resource is specified by the calling application or extension.

loadExtensionPart

public void loadExtensionPart(URL ref,
                              String version,
                              String part,
                              javax.jnlp.DownloadServiceListener progress)
            throws IOException
Downloads a part of an extension.

loadExtensionPart

public void loadExtensionPart(URL ref,
                              String version,
                              String[] parts,
                              javax.jnlp.DownloadServiceListener progress)
            throws IOException
Downloads the parts of an extension.

loadPart

public void loadPart(String part,
                     javax.jnlp.DownloadServiceListener progress)
            throws IOException
Downloads the part.

loadPart

public void loadPart(String[] parts,
                     javax.jnlp.DownloadServiceListener progress)
            throws IOException
Downloads the parts.

loadResource

public void loadResource(URL ref,
                         String version,
                         javax.jnlp.DownloadServiceListener progress)
            throws IOException
Downloads a resource.

removeExtensionPart

public void removeExtensionPart(URL ref,
                                String version,
                                String part)
            throws IOException
Notify the system that an extension's part is no longer important to cache.

removeExtensionPart

public void removeExtensionPart(URL ref,
                                String version,
                                String[] parts)
            throws IOException
Notify the system that an extension's parts are no longer important to cache.

removePart

public void removePart(String part)
            throws IOException
Notifies the system that a part is no longer important to cache.

removePart

public void removePart(String[] parts)
            throws IOException
Notifies the system that the parts is no longer important to cache.

removeResource

public void removeResource(URL ref,
                           String version)
            throws IOException
Notifies the system that the resource is no longer important to cache.