Homepage

netx.jnlp.services
Class XDownloadService

java.lang.Object
  extended by netx.jnlp.services.XDownloadService
All Implemented Interfaces:
javax.jnlp.DownloadService

 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
protected XDownloadService()
           
 
Method Summary
 javax.jnlp.DownloadServiceListener getDefaultProgressWindow()
          Returns a listener that will automatically display download progress to the user.
 boolean isExtensionPartCached(java.net.URL ref, java.lang.String version, java.lang.String part)
          Returns whether the part in an extension (specified by the url and version) is cached locally.
 boolean isExtensionPartCached(java.net.URL ref, java.lang.String version, java.lang.String[] parts)
          Returns whether the parts in an extension (specified by the url and version) are cached locally.
 boolean isPartCached(java.lang.String part)
          Returns whether the part of the calling application is cached locally.
 boolean isPartCached(java.lang.String[] parts)
          Returns whether all of the parts of the calling application are cached locally.
 boolean isResourceCached(java.net.URL ref, java.lang.String version)
          Returns whether the resource is cached locally.
 void loadExtensionPart(java.net.URL ref, java.lang.String version, java.lang.String[] parts, javax.jnlp.DownloadServiceListener progress)
          Downloads the parts of an extension.
 void loadExtensionPart(java.net.URL ref, java.lang.String version, java.lang.String part, javax.jnlp.DownloadServiceListener progress)
          Downloads a part of an extension.
 void loadPart(java.lang.String[] parts, javax.jnlp.DownloadServiceListener progress)
          Downloads the parts.
 void loadPart(java.lang.String part, javax.jnlp.DownloadServiceListener progress)
          Downloads the part.
 void loadResource(java.net.URL ref, java.lang.String version, javax.jnlp.DownloadServiceListener progress)
          Downloads a resource.
 void removeExtensionPart(java.net.URL ref, java.lang.String version, java.lang.String part)
          Notify the system that an extension's part is no longer important to cache.
 void removeExtensionPart(java.net.URL ref, java.lang.String version, java.lang.String[] parts)
          Notify the system that an extension's parts are no longer important to cache.
 void removePart(java.lang.String part)
          Notifies the system that a part is no longer important to cache.
 void removePart(java.lang.String[] parts)
          Notifies the system that the parts is no longer important to cache.
 void removeResource(java.net.URL ref, java.lang.String version)
          Notifies the system that the resource is no longer important to cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XDownloadService

protected XDownloadService()
Method Detail

getDefaultProgressWindow

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

Specified by:
getDefaultProgressWindow in interface javax.jnlp.DownloadService

isExtensionPartCached

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

Specified by:
isExtensionPartCached in interface javax.jnlp.DownloadService

isExtensionPartCached

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

Specified by:
isExtensionPartCached in interface javax.jnlp.DownloadService

isPartCached

public boolean isPartCached(java.lang.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.

Specified by:
isPartCached in interface javax.jnlp.DownloadService

isPartCached

public boolean isPartCached(java.lang.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.

Specified by:
isPartCached in interface javax.jnlp.DownloadService

isResourceCached

public boolean isResourceCached(java.net.URL ref,
                                java.lang.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.

Specified by:
isResourceCached in interface javax.jnlp.DownloadService

loadExtensionPart

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

Specified by:
loadExtensionPart in interface javax.jnlp.DownloadService
Throws:
java.io.IOException

loadExtensionPart

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

Specified by:
loadExtensionPart in interface javax.jnlp.DownloadService
Throws:
java.io.IOException

loadPart

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

Specified by:
loadPart in interface javax.jnlp.DownloadService
Throws:
java.io.IOException

loadPart

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

Specified by:
loadPart in interface javax.jnlp.DownloadService
Throws:
java.io.IOException

loadResource

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

Specified by:
loadResource in interface javax.jnlp.DownloadService
Throws:
java.io.IOException

removeExtensionPart

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

Specified by:
removeExtensionPart in interface javax.jnlp.DownloadService
Throws:
java.io.IOException

removeExtensionPart

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

Specified by:
removeExtensionPart in interface javax.jnlp.DownloadService
Throws:
java.io.IOException

removePart

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

Specified by:
removePart in interface javax.jnlp.DownloadService
Throws:
java.io.IOException

removePart

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

Specified by:
removePart in interface javax.jnlp.DownloadService
Throws:
java.io.IOException

removeResource

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

Specified by:
removeResource in interface javax.jnlp.DownloadService
Throws:
java.io.IOException

Homepage