Class TorrentDownloaderFactory


  • public class TorrentDownloaderFactory
    extends java.lang.Object
    • Constructor Detail

      • TorrentDownloaderFactory

        public TorrentDownloaderFactory()
    • Method Detail

      • create

        public static TorrentDownloader create​(TorrentDownloaderCallBackInterface callback,
                                               java.lang.String url,
                                               java.lang.String referrer,
                                               java.util.Map request_properties,
                                               java.lang.String fileordir)
        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
        Returns:
      • initManager

        public static void initManager​(GlobalManager gm,
                                       boolean autostart)
      • downloadManaged

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

        public static TorrentDownloader downloadManaged​(java.lang.String url)
      • downloadToLocationManaged

        public static TorrentDownloader downloadToLocationManaged​(java.lang.String url,
                                                                  java.lang.String save_path)