public class PackageDownloader extends Object
Modifier | Constructor and Description |
---|---|
protected |
PackageDownloader() |
protected static final org.apache.commons.logging.Log log
public static final String PACKAGES_XML
public static final String PACKAGES_DEFAULT_SELECTION
public static final String PACKAGES_DEFAULT_SELECTION_PRESETS
public static final String PACKAGES_DEFAULT_SELECTION_PACKAGES
protected static final int NB_DOWNLOAD_THREADS
protected static final int NB_CHECK_THREADS
protected static final int QUEUESIZE
public static final String BASE_URL_KEY
public static final String DEFAULT_BASE_URL
protected CopyOnWriteArrayList<PendingDownload> pendingDownloads
protected static PackageDownloader instance
protected org.apache.http.impl.client.DefaultHttpClient httpClient
protected Boolean canReachServer
protected DownloadablePackageOptions downloadOptions
protected static final String DIGEST
protected static final int DIGEST_CHUNK
protected String lastSelectionDigest
protected final AtomicInteger dwThreadCount
protected final AtomicInteger checkThreadCount
protected ConfigurationGenerator configurationGenerator
protected ThreadPoolExecutor download_tpe
protected ThreadPoolExecutor check_tpe
protected PackageDownloader()
protected ConfigurationGenerator getConfig()
protected String getBaseUrl()
public static PackageDownloader instance()
public static void reset()
public void setProxy(String proxy, int port, String login, String password, String NTLMHost, String NTLMDomain)
protected String getSelectionDigest(List<String> ids)
public void selectOptions(List<String> ids)
protected File getDownloadDirectory()
public boolean canReachServer()
public DownloadablePackageOptions getPackageOptions()
protected File getRemotePackagesDescriptor()
protected Properties getDefaultPackageSelection()
protected void saveSelectedPackages(List<DownloadPackage> pkgs)
protected File getLocalPackagesDescriptor()
public List<DownloadPackage> getSelectedPackages()
public void scheduleDownloadedPackagesForInstallation(String installationFilePath) throws IOException
IOException
public List<PendingDownload> getPendingDownloads()
public void reStartDownload(String id)
public void startDownload()
public void startDownload(List<DownloadPackage> pkgs)
protected boolean needToDownload(DownloadPackage pkg)
protected void startDownloadPackage(DownloadPackage pkg)
protected void checkPackage(PendingDownload download)
public boolean isDownloadStarted()
public boolean isDownloadCompleted()
public boolean isDownloadInProgress()
public void shutdown()
Copyright © 2016 Nuxeo SA. All rights reserved.