Class XDownloadService

  • All Implemented Interfaces:
    DownloadService

    class XDownloadService
    extends java.lang.Object
    implements DownloadService
    The DownloadService JNLP service.
    Version:
    $Revision: 1.7 $
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) JNLPClassLoader getClassLoader()
      Returns the JNLPClassLoader of the application
      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, DownloadServiceListener progress)
      Downloads the parts of an extension.
      void loadExtensionPart​(java.net.URL ref, java.lang.String version, java.lang.String part, DownloadServiceListener progress)
      Downloads a part of an extension.
      void loadPart​(java.lang.String[] parts, DownloadServiceListener progress)
      Downloads the parts.
      void loadPart​(java.lang.String part, DownloadServiceListener progress)
      Downloads the part.
      void loadResource​(java.net.URL ref, java.lang.String version, 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

        XDownloadService()
    • Method Detail

      • 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 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 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 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 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 DownloadService
      • loadExtensionPart

        public void loadExtensionPart​(java.net.URL ref,
                                      java.lang.String version,
                                      java.lang.String[] parts,
                                      DownloadServiceListener progress)
                               throws java.io.IOException
        Downloads the parts of an extension.
        Specified by:
        loadExtensionPart in interface DownloadService
        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.IOException
        Downloads a part of an extension.
        Specified by:
        loadExtensionPart in interface DownloadService
        Throws:
        java.io.IOException
      • loadResource

        public void loadResource​(java.net.URL ref,
                                 java.lang.String version,
                                 DownloadServiceListener progress)
                          throws java.io.IOException
        Downloads a resource.
        Specified by:
        loadResource in interface 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 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 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 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 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 DownloadService
        Throws:
        java.io.IOException