netx.jnlp.cache
Interface DownloadIndicator
- DefaultDownloadIndicator
public interface DownloadIndicator
A DownloadIndicator creates DownloadServiceListeners that are
notified of resources being transferred and their progress.
void | disposeListener(javax.jnlp.DownloadServiceListener listener) - Indicates that a download service listener that was obtained
from the getDownloadListener method will no longer be used.
|
int | getInitialDelay() - Return a time in milliseconds to wait for a download to
complete before obtaining a listener for the download.
|
javax.jnlp.DownloadServiceListener | getListener(ApplicationInstance app, String downloadName, resources[] ) - Return a download service listener that displays the progress
of downloading resources.
|
int | getUpdateRate() - Return the desired time in milliseconds between updates.
|
disposeListener
public void disposeListener(javax.jnlp.DownloadServiceListener listener)
Indicates that a download service listener that was obtained
from the getDownloadListener method will no longer be used.
This method can be used to ensure that progress dialogs are
properly removed once a particular download is finished.
listener
- the listener that is no longer in use
getInitialDelay
public int getInitialDelay()
Return a time in milliseconds to wait for a download to
complete before obtaining a listener for the download. This
value can be used to skip lengthy operations, such as
initializing a GUI, for downloads that complete quickly. The
getListener method is not called if the download completes
in less time than the returned delay.
- delay in milliseconds, must be >= 0
getListener
public javax.jnlp.DownloadServiceListener getListener(ApplicationInstance app,
String downloadName,
resources[] )
Return a download service listener that displays the progress
of downloading resources. Update messages may be reported
for URLs that are not included initially.
Progress messages are sent as if the DownloadServiceListener
were listening to a DownloadService request. The listener
will receive progress messages from time to time during the
download.
app
- JNLP application downloading the files, or null if not applicabledownloadName
- name identifying the download to the user
getUpdateRate
public int getUpdateRate()
Return the desired time in milliseconds between updates.
Updates are not guarenteed to occur based on this value; for
example, they may occur based on the download percent or some
other factor.
- rate in milliseconds, must be >= 0