Package | Class | Tree | Index
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.jnlp
Interface DownloadService

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.

Version:
  1.0

Method Summary
`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 mentioned in the JNLP file for the application.
`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 mentioned in the JNLP file for the application.
`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 mentioned in the JNLP file for the application.

Method Detail

### isResourceCached

    public 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 mentioned in the JNLP file for the application.
  Parameters:
    `ref` - The URL for the resource.
    `version` - The version string, or `null` for no version.
  Returns:
    `true` if the above conditions are met, and `false` otherwise.

### isPartCached

    public 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.
  Parameters:
    `part` - The name of the part.
  Returns:
    `true` if the above conditions are met, and `false` otherwise.

### isPartCached

    public 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.
  Parameters:
    `parts` - An array of part names.
  Returns:
    `true` if the above conditions are met, and `false` otherwise.

### isExtensionPartCached

    public 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.
  Parameters:
    `ref` - The URL for the resource.
    `version` - The version string, or `null` for no version.
    `part` - The name of the part.
  Returns:
    `true` if the above conditions are met, and `false` otherwise.

### isExtensionPartCached

    public 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.
  Parameters:
    `ref` - The URL for the resource.
    `version` - The version string, or `null` for no version.
    `parts` - An array of part names.
  Returns:
    `true` if the above conditions are met, and `false` otherwise.

### loadResource

    public void loadResource(java.net.URL ref,
                             java.lang.String version,
                             DownloadServiceListener progress)
                      throws java.io.IOException

  Downloads the given resource, if the resource is mentioned in the JNLP file for the application. This method will block until the download is completed or an exception occurs.
  Parameters:
    `ref` - The URL for the resource.
    `version` - The version string, or `null` for no version.
    `progress` - Download progress callback object.

### loadPart

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

  Downloads the given part, if the part is mentioned in the JNLP file for the application. This method will block until the download is completed or an exception occurs.
  Parameters:
    `part` - The name of the part.
    `progress` - Download progress callback object.

### loadPart

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

  Downloads the given parts, if the parts are mentioned in the JNLP file for the application. This method will block until the download is completed or an exception occurs.
  Parameters:
    `parts` - An array of part names.
    `progress` - Download progress callback object.

### loadExtensionPart

    public void loadExtensionPart(java.net.URL ref,
                                  java.lang.String version,
                                  java.lang.String part,
                                  DownloadServiceListener progress)
                           throws java.io.IOException

  Downloads the given part of the given extension, if the part and the extension are mentioned in the JNLP file for the application. This method will block until the download is completed or an exception occurs.
  Parameters:
    `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.

### loadExtensionPart

    public void loadExtensionPart(java.net.URL ref,
                                  java.lang.String version,
                                  java.lang.String[] parts,
                                  DownloadServiceListener progress)
                           throws java.io.IOException

  Downloads the given parts of the given extension, if the parts and the extension are mentioned in the JNLP file for the application. This method will block until the download is completed or an exception occurs.
  Parameters:
    `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.

### removeResource

    public void removeResource(java.net.URL ref,
                               java.lang.String version)
                        throws java.io.IOException

  Removes the given resource from the cache, if the resource is mentioned in the JNLP file for the application.
  Parameters:
    `ref` - The URL for the resource.
    `version` - The version string, or `null` for no version.

### removePart

    public void removePart(java.lang.String part)
                    throws java.io.IOException

  Removes the given part from the cache, if the part is mentioned in the JNLP file for the application.
  Parameters:
    `part` - The name of the part.

### removePart

    public void removePart(java.lang.String[] parts)
                    throws java.io.IOException

  Removes the given parts from the cache, if the parts are mentioned in the JNLP file for the application.
  Parameters:
    `parts` - An array of part names.

### removeExtensionPart

    public void removeExtensionPart(java.net.URL ref,
                                    java.lang.String version,
                                    java.lang.String part)
                             throws java.io.IOException

  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.
  Parameters:
    `ref` - The URL for the resource.
    `version` - The version string, or `null` for no version.
    `part` - The name of the part.

### removeExtensionPart

    public void removeExtensionPart(java.net.URL ref,
                                    java.lang.String version,
                                    java.lang.String[] parts)
                             throws java.io.IOException

  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.
  Parameters:
    `ref` - The URL for the resource.
    `version` - The version string, or `null` for no version.
    `parts` - An array of part names.

### getDefaultProgressWindow

    public 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.

Package | Class | Tree | Index
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2001-2002 Sun Microsystems, Inc. All Rights Reserved