Package org.gudy.azureus2.plugins.utils.resourcedownloader

Examples of org.gudy.azureus2.plugins.utils.resourcedownloader.ResourceDownloaderFactory.create()


    String  url_str = ConstantsVuze.getDefaultContentNetwork().getTorrentDownloadService( Base32.encode( hash ), null );
   
    ResourceDownloaderFactory rdf = ResourceDownloaderFactoryImpl.getSingleton();
   
    try{
      ResourceDownloader rd = rdf.create( new URL( url_str ));
   
      InputStream  is = rd.download();
     
      try{   
        TOTorrent  torrent = TOTorrentFactory.deserialiseFromBEncodedInputStream( is );
View Full Code Here


      public void run() {

        String s;
        ResourceDownloaderFactory rdf = ResourceDownloaderFactoryImpl.getSingleton();
        try {
          ResourceDownloader rd = rdf.create(new URL(url));
          InputStream is = rd.download();
          int length = is.available();
          byte data[] = new byte[length];
          is.read(data);
          is.close();
View Full Code Here

       
          ResourceDownloaderFactory factory = ResourceDownloaderFactoryImpl.getSingleton();
          List downloaders =  new ArrayList();
          for(int i = 0 ; i < mirrors.length ; i++) {
            try {
              downloaders.add(factory.getSuffixBasedDownloader(factory.create(new URL(mirrors[i]))));
            } catch(MalformedURLException e) {
              //Do nothing
              if (Logger.isEnabled())
                Logger.log(new LogEvent(LOGID, LogEvent.LT_WARNING,
                    "Cannot use URL " + mirrors[i] + " (not valid)"));
View Full Code Here

         
          retries = 1;
        }
      }
     
      ResourceDownloader rd = rdf.getRetryDownloader( rdf.create( url, true ), retries );
       
      rd.addListener( this );
       
      InputStream  data = rd.download();
           
View Full Code Here

        try {
           
          URL url_addressIP = new URL("http://" + addressIP);
                ResourceDownloaderFactory rdf = ResourceDownloaderFactoryImpl.getSingleton();
                 
                  ResourceDownloader downloader = rdf.create(
                          url_addressIP,
                          config_getter.getPluginStringParameter( "AzTrackerFind_url_user"),
                          config_getter.getPluginStringParameter( "AzTrackerFind_url_password"));
                 // downloader = rdf.getSuffixBasedDownloader( downloader);
                  downloader = rdf.getTimeoutDownloader(downloader, config_getter.getPluginIntParameter("timeout_value")*1000 );
View Full Code Here

            URL url_get = new URL (url);
            rdf = pluginInterface.getUtilities().getResourceDownloaderFactory();
           
           
            //normal resource downloader
            ResourceDownloader rd_t = rdf.create(url_get, user, password);
           
            rd_t = rdf.getRetryDownloader(rd_t, 3);
            rd_t = rdf.getTimeoutDownloader(rd_t,30000);
            rd_t = rdf.getSuffixBasedDownloader(rd_t);
           
View Full Code Here

              System.out.println("Duplicate Torrent " + filename + ".torrent .. not saved");
              return;
          }
            URL url_to_get = new URL(url);
            ResourceDownloaderFactory rdf = pluginInterface.getUtilities().getResourceDownloaderFactory();
            ResourceDownloader rd_t = rdf.create(url_to_get);
            //rd_t = rdf.getRetryDownloader(rd_t, 3);
            rd_t = rdf.getTimeoutDownloader(rd_t,120000);
            rd_t = rdf.getMetaRefreshDownloader(rd_t);
            rd_t.addListener(new ResourceDownloaderListener()
            {
View Full Code Here

        try {
           
          URL url_addressIP = new URL("http://" + addressIP);
                ResourceDownloaderFactory rdf = ResourceDownloaderFactoryImpl.getSingleton();
                 
                  ResourceDownloader downloader = rdf.create(url_addressIP,url_user, url_password);
                 // downloader = rdf.getSuffixBasedDownloader( downloader);
                  downloader = rdf.getTimeoutDownloader(downloader, VERSION_TIMEOUT_MILLIS );
                boolean completed = false;
                 downloader.addListener(new ResourceDownloaderAdapter() {
               
View Full Code Here

            URL url_get = new URL (url);
            rdf = pluginInterface.getUtilities().getResourceDownloaderFactory();
           
           
            //normal resource downloader
            ResourceDownloader rd_t = rdf.create(
                    url_get,
                    config_getter.getPluginStringParameter( "AzTrackerFind_url_user"),
                    config_getter.getPluginStringParameter( "AzTrackerFind_url_password"));
           
            rd_t = rdf.getRetryDownloader(rd_t, 3);
View Full Code Here

            }
            else {
                url_final = new URL(url);
            }
            //normal resource downloader
            ResourceDownloader rd_t = rdf.create(url_final);
           
            //rd_t = rdf.getRetryDownloader(rd_t, 3);
            rd_t = rdf.getTimeoutDownloader(rd_t,1200000);
           
             rd_t = rdf.getMetaRefreshDownloader(rd_t);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.