|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gudy.azureus2.pluginsimpl.local.utils.resourcedownloader.ResourceDownloaderFactoryImpl
public class ResourceDownloaderFactoryImpl
Field Summary | |
---|---|
protected static ResourceDownloaderFactoryImpl |
singleton
|
Constructor Summary | |
---|---|
ResourceDownloaderFactoryImpl()
|
Method Summary | |
---|---|
ResourceDownloader |
create(java.io.File file)
Creates a downloader for a local file - in particular this is useful for installing a plugin from a local file as the installer required ResourceDownloader instances to operate |
ResourceDownloader |
create(ResourceDownloaderDelayedFactory factory)
creates a downloader that will be asked to create a ResourceDownloader when required. |
ResourceDownloader |
create(java.net.URL url)
creates a basic downloader. |
ResourceDownloader |
create(java.net.URL url,
boolean force_no_proxy)
Creates a basic downloader, where you can force any configured proxy to be avoided. |
ResourceDownloader |
create(java.net.URL url,
byte[] postData)
|
ResourceDownloader |
create(java.net.URL url,
java.net.Proxy proxy)
|
ResourceDownloader |
create(java.net.URL url,
java.lang.String postData)
|
ResourceDownloader |
create(java.net.URL url,
java.lang.String postData,
java.net.Proxy proxy)
|
ResourceDownloader |
create(java.net.URL url,
java.lang.String user_name,
java.lang.String password)
|
ResourceDownloader |
createWithAutoPluginProxy(java.net.URL url)
|
ResourceDownloader |
getAlternateDownloader(ResourceDownloader[] downloaders)
Gets a downloader that will cycle through a list of downloaders until a download succeeds. |
ResourceDownloader |
getAlternateDownloader(ResourceDownloader[] downloaders,
int max_to_try)
Gets a downloader that will cycle through a list of downloaders until a download succeeds. |
protected ResourceDownloader |
getAlternateDownloader(ResourceDownloader[] downloaders,
int max_to_try,
boolean random)
|
ResourceDownloader |
getMetaRefreshDownloader(ResourceDownloader downloader)
gets a downloader that will automatically follow META refresh tags Will only do a single level of indirection |
ResourceDownloader |
getRandomDownloader(ResourceDownloader[] downloaders)
Gets a downloader that will cycle through a list of downloaders until a download succeeds. |
ResourceDownloader |
getRandomDownloader(ResourceDownloader[] downloaders,
int max_to_try)
Gets a downloader that will cycle through a list of downloaders until a download succeeds. |
ResourceDownloader |
getRetryDownloader(ResourceDownloader downloader,
int retry_count)
gets a downloader that will retry a number of times before failing |
static ResourceDownloaderFactory |
getSingleton()
|
ResourceDownloader |
getSourceforgeDownloader(java.lang.String project_name,
java.lang.String filename)
Creates a resource downloader which can be used to download a file from a Sourceforge project (from different mirrors). |
ResourceDownloader[] |
getSourceforgeDownloaders(java.lang.String project_name,
java.lang.String filename)
Creates multiple resource downloaders which can be used to download a file from a Sourceforge project (from different mirrors). |
ResourceDownloader |
getSuffixBasedDownloader(ResourceDownloader _downloader)
Returns a downloader that does something sensible based on the url suffix. |
ResourceDownloader |
getTimeoutDownloader(ResourceDownloader downloader,
int timeout_millis)
gets a downloader that will timeout after a given period |
ResourceDownloader |
getTorrentDownloader(ResourceDownloader downloader,
boolean persistent)
Given a downloader that will download a torrent, this will download the torrent data itself. |
ResourceDownloader |
getTorrentDownloader(ResourceDownloader downloader,
boolean persistent,
java.io.File download_directory)
Download a torrent's data to the given download location |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static ResourceDownloaderFactoryImpl singleton
Constructor Detail |
---|
public ResourceDownloaderFactoryImpl()
Method Detail |
---|
public static ResourceDownloaderFactory getSingleton()
public ResourceDownloader create(java.io.File file)
ResourceDownloaderFactory
create
in interface ResourceDownloaderFactory
public ResourceDownloader create(java.net.URL url)
ResourceDownloaderFactory
create
in interface ResourceDownloaderFactory
public ResourceDownloader createWithAutoPluginProxy(java.net.URL url)
createWithAutoPluginProxy
in interface ResourceDownloaderFactory
public ResourceDownloader create(java.net.URL url, boolean force_no_proxy)
ResourceDownloaderFactory
create
in interface ResourceDownloaderFactory
public ResourceDownloader create(java.net.URL url, java.net.Proxy proxy)
create
in interface ResourceDownloaderFactory
public ResourceDownloader create(java.net.URL url, java.lang.String postData)
create
in interface ResourceDownloaderFactory
public ResourceDownloader create(java.net.URL url, java.lang.String postData, java.net.Proxy proxy)
create
in interface ResourceDownloaderFactory
public ResourceDownloader create(java.net.URL url, byte[] postData)
create
in interface ResourceDownloaderFactory
public ResourceDownloader create(java.net.URL url, java.lang.String user_name, java.lang.String password)
create
in interface ResourceDownloaderFactory
public ResourceDownloader create(ResourceDownloaderDelayedFactory factory)
ResourceDownloaderFactory
create
in interface ResourceDownloaderFactory
public ResourceDownloader getRetryDownloader(ResourceDownloader downloader, int retry_count)
ResourceDownloaderFactory
getRetryDownloader
in interface ResourceDownloaderFactory
public ResourceDownloader getTimeoutDownloader(ResourceDownloader downloader, int timeout_millis)
ResourceDownloaderFactory
getTimeoutDownloader
in interface ResourceDownloaderFactory
public ResourceDownloader getAlternateDownloader(ResourceDownloader[] downloaders)
ResourceDownloaderFactory
getAlternateDownloader
in interface ResourceDownloaderFactory
public ResourceDownloader getAlternateDownloader(ResourceDownloader[] downloaders, int max_to_try)
ResourceDownloaderFactory
getAlternateDownloader
in interface ResourceDownloaderFactory
public ResourceDownloader getRandomDownloader(ResourceDownloader[] downloaders)
ResourceDownloaderFactory
getRandomDownloader
in interface ResourceDownloaderFactory
public ResourceDownloader getRandomDownloader(ResourceDownloader[] downloaders, int max_to_try)
ResourceDownloaderFactory
getRandomDownloader
in interface ResourceDownloaderFactory
protected ResourceDownloader getAlternateDownloader(ResourceDownloader[] downloaders, int max_to_try, boolean random)
public ResourceDownloader getMetaRefreshDownloader(ResourceDownloader downloader)
ResourceDownloaderFactory
getMetaRefreshDownloader
in interface ResourceDownloaderFactory
public ResourceDownloader getTorrentDownloader(ResourceDownloader downloader, boolean persistent)
ResourceDownloaderFactory
getTorrentDownloader
in interface ResourceDownloaderFactory
persistent
- whether or not the d/l will be retained over az stop/start
public ResourceDownloader getTorrentDownloader(ResourceDownloader downloader, boolean persistent, java.io.File download_directory)
ResourceDownloaderFactory
getTorrentDownloader
in interface ResourceDownloaderFactory
public ResourceDownloader getSuffixBasedDownloader(ResourceDownloader _downloader)
ResourceDownloaderFactory
getSuffixBasedDownloader
in interface ResourceDownloaderFactory
public ResourceDownloader[] getSourceforgeDownloaders(java.lang.String project_name, java.lang.String filename)
ResourceDownloaderFactory
ResourceDownloaderFactory.getRandomDownloader(ResourceDownloader[])
.
getSourceforgeDownloaders
in interface ResourceDownloaderFactory
public ResourceDownloader getSourceforgeDownloader(java.lang.String project_name, java.lang.String filename)
ResourceDownloaderFactory
getSourceforgeDownloader
in interface ResourceDownloaderFactory
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |