Examples of DownloadAnnounceResult


Examples of org.gudy.azureus2.plugins.download.DownloadAnnounceResult

      // ends of the tracking operation it means we will only track between peers that
      // both have a legitimate copy of the torrent.
       
    if ( t.isPrivate()){
     
      DownloadAnnounceResult announce = d.getLastAnnounceResult();

      if (   announce == null ||
          announce.getResponseType() != DownloadAnnounceResult.RT_SUCCESS ||
          announce.getPeers().length < 2 ){
       
        return( false );
      }
    }
   
View Full Code Here

Examples of org.gudy.azureus2.plugins.download.DownloadAnnounceResult

    if ( t.getSize() < 10*1024*1024 ){
     
      return( -99 );
    }
   
    DownloadAnnounceResult announce = download.getLastAnnounceResult();
   
    if (   announce == null ||
        announce.getResponseType() != DownloadAnnounceResult.RT_SUCCESS ){     
     
      return( -98 );
    }
   
    DownloadScrapeResult scrape = download.getLastScrapeResult();
View Full Code Here

Examples of org.gudy.azureus2.plugins.download.DownloadAnnounceResult

                final DownloadAnnounceResultPeer[]  peers = new DownloadAnnounceResultPeer[peers_for_announce.size()];
               
                peers_for_announce.toArray( peers );
               
                download.setAnnounceResult(
                    new DownloadAnnounceResult()
                    {
                      public Download
                      getDownload()
                      {
                        return( download );
View Full Code Here

Examples of org.gudy.azureus2.plugins.download.DownloadAnnounceResult

   
    protected void
    check(
      List    peers )
    {
      DownloadAnnounceResult  an = download.getLastAnnounceResult();
     
      URL  target = an==null?null:an.getURL();
     
      if ( target == null ){
       
        target = download.getTorrent().getAnnounceURL();
      }
View Full Code Here

Examples of org.gudy.azureus2.plugins.download.DownloadAnnounceResult

             
              if (   state == Download.ST_DOWNLOADING ||
                  state == Download.ST_SEEDING ){
               
                download.setAnnounceResult(
                  new DownloadAnnounceResult()
                  {
                    public Download
                    getDownload()
                    {
                      return( download );
View Full Code Here

Examples of org.gudy.azureus2.plugins.download.DownloadAnnounceResult

                 
                    // only track if torrent's tracker is not available
                               
                  if ( is_active ){
                   
                    DownloadAnnounceResult result = download.getLastAnnounceResult();
                   
                    if result == null ||
                        result.getResponseType() == DownloadAnnounceResult.RT_ERROR ||
                        TorrentUtils.isDecentralised(result.getURL())){
                     
                      register_type  = REG_TYPE_FULL;
                     
                      register_reason = "tracker unavailable (announce)";
                     
                    }else
                     
                      register_reason = "tracker available (announce: " + result.getURL() + ")";               
                    }
                  }else{
                   
                    DownloadScrapeResult result = download.getLastScrapeResult();
                   
                    if result == null ||
                        result.getResponseType() == DownloadScrapeResult.RT_ERROR ||
                        TorrentUtils.isDecentralised(result.getURL())){
                     
                      register_type  = REG_TYPE_FULL;
                     
                      register_reason = "tracker unavailable (scrape)";
                     
                    }else{
                     
                      register_reason = "tracker available (scrape: " + result.getURL() + ")";               
                    }
                  }
                 
                  if ( register_type != REG_TYPE_FULL && track_limited_when_online.getValue()){
                   
                    Boolean  existing = (Boolean)limited_online_tracking.get( download );
                   
                    boolean  track_it = false;
                   
                    if ( existing != null ){
                     
                      track_it = existing.booleanValue();
                     
                    }else{
                     
                      DownloadScrapeResult result = download.getLastScrapeResult();
                     
                      if result != null&&
                          result.getResponseType() == DownloadScrapeResult.RT_SUCCESS ){
                       
                        int  seeds     = result.getSeedCount();
                        int leechers  = result.getNonSeedCount();
                       
                        int  swarm_size = seeds + leechers;
                                               
                        if ( swarm_size <= LIMITED_TRACK_SIZE ){
                         
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.