Package net.sourceforge.jnlp.services
Class XDownloadService
- java.lang.Object
-
- net.sourceforge.jnlp.services.XDownloadService
-
- All Implemented Interfaces:
DownloadService
class XDownloadService extends java.lang.Object implements DownloadService
The DownloadService JNLP service.- Version:
- $Revision: 1.7 $
-
-
Constructor Summary
Constructors Constructor Description XDownloadService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) JNLPClassLoadergetClassLoader()Returns theJNLPClassLoaderof the applicationDownloadServiceListenergetDefaultProgressWindow()Returns a listener that will automatically display download progress to the user.booleanisExtensionPartCached(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.booleanisExtensionPartCached(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.booleanisPartCached(java.lang.String part)Returns whether the part of the calling application is cached locally.booleanisPartCached(java.lang.String[] parts)Returns whether all of the parts of the calling application are cached locally.booleanisResourceCached(java.net.URL ref, java.lang.String version)Returns whether the resource is cached locally.voidloadExtensionPart(java.net.URL ref, java.lang.String version, java.lang.String[] parts, DownloadServiceListener progress)Downloads the parts of an extension.voidloadExtensionPart(java.net.URL ref, java.lang.String version, java.lang.String part, DownloadServiceListener progress)Downloads a part of an extension.voidloadPart(java.lang.String[] parts, DownloadServiceListener progress)Downloads the parts.voidloadPart(java.lang.String part, DownloadServiceListener progress)Downloads the part.voidloadResource(java.net.URL ref, java.lang.String version, DownloadServiceListener progress)Downloads a resource.voidremoveExtensionPart(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.voidremoveExtensionPart(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.voidremovePart(java.lang.String part)Notifies the system that a part is no longer important to cache.voidremovePart(java.lang.String[] parts)Notifies the system that the parts is no longer important to cache.voidremoveResource(java.net.URL ref, java.lang.String version)Notifies the system that the resource is no longer important to cache.
-
-
-
Method Detail
-
getClassLoader
JNLPClassLoader getClassLoader()
Returns theJNLPClassLoaderof the application- Returns:
- the
JNLPClassLoaderof the application
-
getDefaultProgressWindow
public DownloadServiceListener getDefaultProgressWindow()
Returns a listener that will automatically display download progress to the user.- Specified by:
getDefaultProgressWindowin interfaceDownloadService- Returns:
- always
null
-
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:
isExtensionPartCachedin interfaceDownloadService
-
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:
isExtensionPartCachedin interfaceDownloadService
-
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:
isPartCachedin interfaceDownloadService
-
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:
isPartCachedin interfaceDownloadService
-
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:
isResourceCachedin interfaceDownloadService
-
loadExtensionPart
public void loadExtensionPart(java.net.URL ref, java.lang.String version, java.lang.String[] parts, DownloadServiceListener progress) throws java.io.IOExceptionDownloads the parts of an extension.- Specified by:
loadExtensionPartin interfaceDownloadService- Throws:
java.io.IOException
-
loadExtensionPart
public void loadExtensionPart(java.net.URL ref, java.lang.String version, java.lang.String part, DownloadServiceListener progress) throws java.io.IOExceptionDownloads a part of an extension.- Specified by:
loadExtensionPartin interfaceDownloadService- Throws:
java.io.IOException
-
loadPart
public void loadPart(java.lang.String[] parts, DownloadServiceListener progress) throws java.io.IOExceptionDownloads the parts.- Specified by:
loadPartin interfaceDownloadService- Throws:
java.io.IOException
-
loadPart
public void loadPart(java.lang.String part, DownloadServiceListener progress) throws java.io.IOExceptionDownloads the part.- Specified by:
loadPartin interfaceDownloadService- Throws:
java.io.IOException
-
loadResource
public void loadResource(java.net.URL ref, java.lang.String version, DownloadServiceListener progress) throws java.io.IOExceptionDownloads a resource.- Specified by:
loadResourcein interfaceDownloadService- Throws:
java.io.IOException
-
removeExtensionPart
public void removeExtensionPart(java.net.URL ref, java.lang.String version, java.lang.String part) throws java.io.IOExceptionNotify the system that an extension's part is no longer important to cache.- Specified by:
removeExtensionPartin interfaceDownloadService- Throws:
java.io.IOException
-
removeExtensionPart
public void removeExtensionPart(java.net.URL ref, java.lang.String version, java.lang.String[] parts) throws java.io.IOExceptionNotify the system that an extension's parts are no longer important to cache.- Specified by:
removeExtensionPartin interfaceDownloadService- Throws:
java.io.IOException
-
removePart
public void removePart(java.lang.String part) throws java.io.IOExceptionNotifies the system that a part is no longer important to cache.- Specified by:
removePartin interfaceDownloadService- Throws:
java.io.IOException
-
removePart
public void removePart(java.lang.String[] parts) throws java.io.IOExceptionNotifies the system that the parts is no longer important to cache.- Specified by:
removePartin interfaceDownloadService- Throws:
java.io.IOException
-
removeResource
public void removeResource(java.net.URL ref, java.lang.String version) throws java.io.IOExceptionNotifies the system that the resource is no longer important to cache.- Specified by:
removeResourcein interfaceDownloadService- Throws:
java.io.IOException
-
-