osdep
Class WebDownloader
java.lang.Object
osdep.WebDownloader
public class WebDownloader
- extends java.lang.Object
The main class of the library.
Downloads a list file containing links to the versions of the required library/application
for many platforms.
Selects the right version for this platform automatically or, if this did not work,
asking the user to choose.
Downloads the required library/application and unzips it
- Author:
- SHZ Mar 6, 2008
Method Summary |
void |
download(java.lang.String listURL,
java.lang.String zipPath,
java.lang.String finalPath)
Downloads the library/application |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WebDownloader
public WebDownloader(IProxySource proxySource,
IProxyAuthenticationSource authenticationSource,
IConfigurationChooser externalConfigurationChooser,
ISiteChooser siteChooser,
IDownloadListener listener,
ISystemProperties systemProperties)
- Constructor for WebDownloader
- Parameters:
proxySource
- to get the configuration of the proxy server to which to connect to.
If no proxy is needed, proxySource.needsProxy() must return falseauthenticationSource
- to get the authentication data to use for the proxy
If no authentication is needed, authenticationSource.needsProxyAuthentication() must return false
If no proxy is needed, authenticationSource is not usedexternalConfigurationChooser
- to choose the configuration if the automatic chooser failed.siteChooser
- to choose the site where to download the zip file fromlistener
- Listens to the events of the downloading processes (for the list file and the
library/application zip file). Useful to log these processessystemProperties
- the source of the properties defining the platform (os and architecture)
download
public void download(java.lang.String listURL,
java.lang.String zipPath,
java.lang.String finalPath)
throws DownloadException
- Downloads the library/application
- Parameters:
listURL
- the URL where to find the list file describing all the configurationszipPath
- the local path where to save the library zip filefinalPath
- the local path where to write the files extracted from the library zip file
- Throws:
DownloadException