org.gudy.azureus2.core3.torrentdownloader
Class TorrentDownloaderFactory

java.lang.Object
  extended by org.gudy.azureus2.core3.torrentdownloader.TorrentDownloaderFactory

public class TorrentDownloaderFactory
extends java.lang.Object

Author:
Tobias Minich

Constructor Summary
TorrentDownloaderFactory()
           
 
Method Summary
static TorrentDownloader create(java.lang.String url)
           
static TorrentDownloader create(java.lang.String url, boolean logged)
           
static TorrentDownloader create(java.lang.String url, java.lang.String fileordir)
           
static TorrentDownloader create(java.lang.String url, java.lang.String fileordir, boolean logged)
           
static TorrentDownloader create(TorrentDownloaderCallBackInterface callback, java.lang.String url)
           
static TorrentDownloader create(TorrentDownloaderCallBackInterface callback, java.lang.String url, boolean logged)
           
static TorrentDownloader create(TorrentDownloaderCallBackInterface callback, java.lang.String url, java.lang.String referrer, java.util.Map request_properties, java.lang.String fileordir)
           
static TorrentDownloader create(TorrentDownloaderCallBackInterface callback, java.lang.String url, java.lang.String referrer, java.lang.String fileordir)
           
static TorrentDownloader create(TorrentDownloaderCallBackInterface callback, java.lang.String url, java.lang.String referrer, java.lang.String fileordir, boolean logged)
          creates and initializes a TorrentDownloader object with the specified parameters.
static TorrentDownloader downloadManaged(java.lang.String url)
           
static TorrentDownloader downloadManaged(java.lang.String url, boolean logged)
           
static TorrentDownloader downloadManaged(java.lang.String url, java.lang.String fileordir)
           
static TorrentDownloader downloadManaged(java.lang.String url, java.lang.String fileordir, boolean logged)
           
static void initManager(GlobalManager gm, boolean logged, boolean autostart, java.lang.String downloaddir)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TorrentDownloaderFactory

public TorrentDownloaderFactory()
Method Detail

create

public static TorrentDownloader create(TorrentDownloaderCallBackInterface callback,
                                       java.lang.String url,
                                       java.lang.String referrer,
                                       java.lang.String fileordir,
                                       boolean logged)
creates and initializes a TorrentDownloader object with the specified parameters. NOTE: this does not actually start the TorrentDownloader object

Parameters:
callback - object to notify about torrent download status
url - url of torrent file to download
referrer - url of referrer to set as HTTP_REFERER header when requesting torrent
fileordir - path to a file or directory that the actual torrent file should be saved to. if a default save directory is not specified, this will be used instead. even if a default save directory is specified, if this parameter path refers to a file, the filename will be used when saving the torrent
whether - or not logging is enabled for the torrent download. this is performed through the TorrentDownloaderLoggedImpl class which is only available in the uis project
Returns:

create

public static TorrentDownloader create(TorrentDownloaderCallBackInterface callback,
                                       java.lang.String url,
                                       java.lang.String referrer,
                                       java.lang.String fileordir)

create

public static TorrentDownloader create(TorrentDownloaderCallBackInterface callback,
                                       java.lang.String url,
                                       java.lang.String referrer,
                                       java.util.Map request_properties,
                                       java.lang.String fileordir)

create

public static TorrentDownloader create(TorrentDownloaderCallBackInterface callback,
                                       java.lang.String url,
                                       boolean logged)

create

public static TorrentDownloader create(TorrentDownloaderCallBackInterface callback,
                                       java.lang.String url)

create

public static TorrentDownloader create(java.lang.String url,
                                       java.lang.String fileordir,
                                       boolean logged)

create

public static TorrentDownloader create(java.lang.String url,
                                       java.lang.String fileordir)

create

public static TorrentDownloader create(java.lang.String url,
                                       boolean logged)

create

public static TorrentDownloader create(java.lang.String url)

initManager

public static void initManager(GlobalManager gm,
                               boolean logged,
                               boolean autostart,
                               java.lang.String downloaddir)

downloadManaged

public static TorrentDownloader downloadManaged(java.lang.String url,
                                                java.lang.String fileordir,
                                                boolean logged)

downloadManaged

public static TorrentDownloader downloadManaged(java.lang.String url,
                                                java.lang.String fileordir)

downloadManaged

public static TorrentDownloader downloadManaged(java.lang.String url,
                                                boolean logged)

downloadManaged

public static TorrentDownloader downloadManaged(java.lang.String url)