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

## javax.jnlp
Interface DownloadService2

    public interface DownloadService2

Provides cache query services to JNLP applications. Together with methods in `DownloadService`, this allows for advanced programmatic cache management.

Since:
  6.0.18

Nested Class Summary
`static class` | `DownloadService2.ResourceSpec` Specifies patterns for resource queries as arguments and holds results in `getCachedResources(javax.jnlp.DownloadService2.ResourceSpec)` and `getUpdateAvailableResources(javax.jnlp.DownloadService2.ResourceSpec)`.

Field Summary
`static int` | `ALL` Matches all resources in `getCachedResources(javax.jnlp.DownloadService2.ResourceSpec)` and `getUpdateAvailableResources(javax.jnlp.DownloadService2.ResourceSpec)`.
`static int` | `APPLET` Matches applets in `getCachedResources(javax.jnlp.DownloadService2.ResourceSpec)` and `getUpdateAvailableResources(javax.jnlp.DownloadService2.ResourceSpec)`.
`static int` | `APPLICATION` Matches applications in `getCachedResources(javax.jnlp.DownloadService2.ResourceSpec)` and `getUpdateAvailableResources(javax.jnlp.DownloadService2.ResourceSpec)`.
`static int` | `CLASS` Matches class files in `getCachedResources(javax.jnlp.DownloadService2.ResourceSpec)` and `getUpdateAvailableResources(javax.jnlp.DownloadService2.ResourceSpec)`.
`static int` | `EXTENSION` Matches extensions in `getCachedResources(javax.jnlp.DownloadService2.ResourceSpec)` and `getUpdateAvailableResources(javax.jnlp.DownloadService2.ResourceSpec)`.
`static int` | `IMAGE` Matches image files in `getCachedResources(javax.jnlp.DownloadService2.ResourceSpec)` and `getUpdateAvailableResources(javax.jnlp.DownloadService2.ResourceSpec)`.
`static int` | `JAR` Matches JARs in `getCachedResources(javax.jnlp.DownloadService2.ResourceSpec)` and `getUpdateAvailableResources(javax.jnlp.DownloadService2.ResourceSpec)`.

Method Summary
`DownloadService2.ResourceSpec[]` | `getCachedResources(DownloadService2.ResourceSpec spec)` Returns all resources in the cache that match one of the specified resource specs.
`DownloadService2.ResourceSpec[]` | `getUpdateAvailableResources(DownloadService2.ResourceSpec spec)` Returns all resources in the cache that match one of the specified resource specs AND have an update available from their server.

Field Detail

### ALL

    static final int ALL

  Matches all resources in `getCachedResources(javax.jnlp.DownloadService2.ResourceSpec)` and `getUpdateAvailableResources(javax.jnlp.DownloadService2.ResourceSpec)`.

  See Also:
    Constant Field Values

### APPLICATION

    static final int APPLICATION

  Matches applications in `getCachedResources(javax.jnlp.DownloadService2.ResourceSpec)` and `getUpdateAvailableResources(javax.jnlp.DownloadService2.ResourceSpec)`.

  See Also:
    Constant Field Values

### APPLET

    static final int APPLET

  Matches applets in `getCachedResources(javax.jnlp.DownloadService2.ResourceSpec)` and `getUpdateAvailableResources(javax.jnlp.DownloadService2.ResourceSpec)`.

  See Also:
    Constant Field Values

### EXTENSION

    static final int EXTENSION

  Matches extensions in `getCachedResources(javax.jnlp.DownloadService2.ResourceSpec)` and `getUpdateAvailableResources(javax.jnlp.DownloadService2.ResourceSpec)`.

  See Also:
    Constant Field Values

### JAR

    static final int JAR

  Matches JARs in `getCachedResources(javax.jnlp.DownloadService2.ResourceSpec)` and `getUpdateAvailableResources(javax.jnlp.DownloadService2.ResourceSpec)`.

  See Also:
    Constant Field Values

### IMAGE

    static final int IMAGE

  Matches image files in `getCachedResources(javax.jnlp.DownloadService2.ResourceSpec)` and `getUpdateAvailableResources(javax.jnlp.DownloadService2.ResourceSpec)`.

  See Also:
    Constant Field Values

### CLASS

    static final int CLASS

  Matches class files in `getCachedResources(javax.jnlp.DownloadService2.ResourceSpec)` and `getUpdateAvailableResources(javax.jnlp.DownloadService2.ResourceSpec)`.

  See Also:
    Constant Field Values

Method Detail

### getCachedResources

    DownloadService2.ResourceSpec[] getCachedResources(DownloadService2.ResourceSpec spec)

  Returns all resources in the cache that match one of the specified resource specs.
  For supported patterns in the query arguments, see `DownloadService2.ResourceSpec`. The returned `ResourceSpec` objects have specific URL and version properties (i.e. no patterns).

  Parameters:
    `spec` - the spec to match resources against
  Returns:
    all resources that match one of the specs
  Throws:
    `java.lang.IllegalArgumentException` -
    if the ResourceSpec is null, or
    if the ResourceSpec contains a null or empty URL string, or
    if the ResourceSpec contains invalid regular expressions.
    if the ResourceSpec contains a type that is not one of:
    ALL, APPLICATION, APPLET, EXTENSION, JAR, IMAGE, or CLASS.

### getUpdateAvailableResources

    DownloadService2.ResourceSpec[] getUpdateAvailableResources(DownloadService2.ResourceSpec spec)
                                                                throws java.io.IOException

  Returns all resources in the cache that match one of the specified resource specs AND have an update available from their server.
  For supported patterns in the query arguments, see `DownloadService2.ResourceSpec`. The returned `ResourceSpec` objects have specific URL and version properties (i.e. no patterns).
  NOTE: This call may attempt HTTP GET request to check for update.

  Parameters:
    `specs` - the spec to match resources against
  Returns:
    all resources for which an update is available that match one of the specs
  Throws:
    `java.io.IOException` - if something went wrong during update checks
    `java.lang.IllegalArgumentException` -
    if the ResourceSpec is null, or
    if the ResourceSpec contains a null or empty URL string, or
    if the ResourceSpec contains invalid regular expressions.
    if the ResourceSpec contains a type that is not one of:
    ALL, APPLICATION, APPLET, EXTENSION, JAR, IMAGE, or CLASS.

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

Copyright © 1998, 2011, Oracle and/or its affiliates. All rights reserved.