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

## javax.jnlp
Interface BasicService

    public interface BasicService

The `BasicService` interface provides access to the codebase of the application, if an application is run in offline mode, and simple interaction with the native browser on the given platform.

This interface mimics loosely the `AppletContext` functionality.

Since:
  1.0

Method Summary
`java.net.URL` | `getCodeBase()` Returns the codebase for the application.
`boolean` | `isOffline()` Determines if the system is offline.
`boolean` | `isWebBrowserSupported()` Checks if a Web browser is supported on the current platform and by the given JNLP Client.
`boolean` | `showDocument(java.net.URL url)` Directs a browser on the client to show the given URL.

Method Detail

### getCodeBase

    java.net.URL getCodeBase()

  Returns the codebase for the application. The codebase is either specified directly in the JNLP file, or it is the location of the JAR file containing the main class of the application.

  Returns:
    a URL with the codebase of the application

### isOffline

    boolean isOffline()

  Determines if the system is offline. The return value represents the JNLP client's "best guess" at the online / offline state of the client system. The return value is does not have to be guaranteed to be reliable, as it is sometimes difficult to ascertain the true online / offline state of a client system.

  Returns:
    `true` if the system is offline, otherwise `false`

### showDocument

    boolean showDocument(java.net.URL url)

  Directs a browser on the client to show the given URL. This will typically replace the page currently being viewed in a browser with the given URL, or cause a browser to be launched that will show the given URL.

  Parameters:
    `url` - an URL giving the location of the document. A relative URL will be relative to the codebase.
  Returns:
    `true` if the request succeded, otherwise `false`

### isWebBrowserSupported

    boolean isWebBrowserSupported()

  Checks if a Web browser is supported on the current platform and by the given JNLP Client. If this is not the case, then ``showDocument(java.net.URL)`` will always return `false`.

  Returns:
    `true` if a Web browser is supported, otherwise `false`

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

Copyright (c) 2004 Sun Microsystems, Inc. All Rights Reserved