Package org.gudy.azureus2.core3.util

Examples of org.gudy.azureus2.core3.util.SHA1Hasher


      while (torrent.hasNext()) {
               
        DownloadManager dm = (DownloadManager) torrent.next();
               
        DownloadManagerStats stats = dm.getStats();

        boolean bDownloadCompleted = stats.getDownloadCompleted(false) == 1000;
        boolean bCanShow = ((bShowOnlyComplete == bShowOnlyIncomplete) || (bDownloadCompleted && bShowOnlyComplete) || (!bDownloadCompleted && bShowOnlyIncomplete));

        if (bCanShow && bShowOnlyActive) {
          int dmstate = dm.getState();
          bCanShow = (dmstate == DownloadManager.STATE_SEEDING) || (dmstate == DownloadManager.STATE_DOWNLOADING) || (dmstate == DownloadManager.STATE_CHECKING) || (dmstate == DownloadManager.STATE_INITIALIZING) || (dmstate == DownloadManager.STATE_ALLOCATING);
View Full Code Here


          AzureusCore          core,
          AzureusCoreComponent    comp )
          {
            if ( comp instanceof GlobalManager ){
             
              GlobalManager  gm  = (GlobalManager)comp;
             
              gm.addListener( PluginInitializer.this );
            }
          }
      });
   
    core_operation   = _core_operation;
View Full Code Here

  public static void invokeSlider(AzureusCore core, boolean isUpSpeed) {
    final String prefix = MessageText.getString(isUpSpeed
        ? "GeneralView.label.maxuploadspeed"
        : "GeneralView.label.maxdownloadspeed");

    GlobalManager gm = core.getGlobalManager();

    final String configAutoKey = TransferSpeedValidator.getActiveAutoUploadParameter(gm);
    boolean auto = COConfigurationManager.getBooleanParameter(configAutoKey);

    final String configKey = isUpSpeed
        ? TransferSpeedValidator.getActiveUploadParameter(gm)
        : "Max Download Speed KBs";
    int maxBandwidth = COConfigurationManager.getIntParameter(configKey);
    final boolean unlim = (maxBandwidth == 0);
    if (unlim && !isUpSpeed) {
      GlobalManagerStats stats = gm.getStats();
      int dataReceive = stats.getDataReceiveRate();
      if (dataReceive >= 1024) {
        maxBandwidth = dataReceive / 1024;
      }
    }
View Full Code Here

    DownloadManager dm = (DownloadManager) ci.torrents.get(number - 1);
    String name = dm.getDisplayName();
    if (name == null)
      name = "?";
   
    GlobalManager  gm = dm.getGlobalManager();

    if (moveto) {
      gm.moveTo(dm, nmoveto - 1);
      gm.fixUpDownloadManagerPositions();
      ci.out.println("> Torrent #" + Integer.toString(number) + " (" + name + ") moved to #" + Integer.toString(nmoveto) + ".");
    } else if (ncommand > 0) {
      if (gm.isMoveableUp(dm)) {
        while (gm.isMoveableUp(dm))
          gm.moveUp(dm);
        gm.fixUpDownloadManagerPositions();
        ci.out.println("> Torrent #" + Integer.toString(number) + " (" + name + ") moved to top.");
      } else {
        ci.out.println("> Torrent #" + Integer.toString(number) + " (" + name + ") already at top.");
      }
    } else {
      if (gm.isMoveableDown(dm)) {
        while (gm.isMoveableDown(dm))
          gm.moveDown(dm);
        gm.fixUpDownloadManagerPositions();
        ci.out.println("> Torrent #" + Integer.toString(number) + " (" + name + ") moved to bottom.");
      } else {
        ci.out.println("> Torrent #" + Integer.toString(number) + " (" + name + ") already at bottom.");
      }
    }
View Full Code Here

      }
     
      ci.torrents.clear();
      ci.torrents.addAll( shown_torrents );
     
      GlobalManager  gm = ci.getGlobalManager();
     
      ci.out.println("Total Speed (down/up): " + DisplayFormatters.formatByteCountToKiBEtcPerSec(gm.getStats().getDataReceiveRate() + gm.getStats().getProtocolReceiveRate() ) + " / " + DisplayFormatters.formatByteCountToKiBEtcPerSec(gm.getStats().getDataSendRate() + gm.getStats().getProtocolSendRate() ));

      ci.out.println("Transferred Volume (down/up/discarded): " + DisplayFormatters.formatByteCountToKiBEtc(totalReceived) + " / " + DisplayFormatters.formatByteCountToKiBEtc(totalSent) + " / " + DisplayFormatters.formatByteCountToKiBEtc(totalDiscarded));
      ci.out.println("Total Connected Peers (seeds/peers): " + Integer.toString(connectedSeeds) + " / " + Integer.toString(connectedPeers));
      ci.out.println("> -----");
    } else if (subCommand.equalsIgnoreCase("dht") || subCommand.equalsIgnoreCase("d")) {
View Full Code Here

   */
  private static int adjustMaxBandWidth(int maxBandwidth,
      GlobalManager globalManager, boolean up_menu) {
    if(maxBandwidth == 0 && !up_menu )
    {
      GlobalManagerStats stats = globalManager.getStats();
      int dataReceive = stats.getDataReceiveRate();
      if (dataReceive < 1024) {
        maxBandwidth = 275;
      } else {
        maxBandwidth = dataReceive / 1024;           
      }
View Full Code Here

        ? TransferSpeedValidator.getActiveUploadParameter(gm)
        : "Max Download Speed KBs";
    int maxBandwidth = COConfigurationManager.getIntParameter(configKey);
    final boolean unlim = (maxBandwidth == 0);
    if (unlim && !isUpSpeed) {
      GlobalManagerStats stats = gm.getStats();
      int dataReceive = stats.getDataReceiveRate();
      if (dataReceive >= 1024) {
        maxBandwidth = dataReceive / 1024;
      }
    }
View Full Code Here

 
        crypto_available  = true;
       
      }catch( Throwable e ){
       
        Logger.log(new LogAlert(LogAlert.UNREPEATABLE,
            "Unable to initialise cryptographic framework for magnet-based "
                + "torrent downloads, please re-install Java", e));
      }
    }
   
View Full Code Here

          try{
            SESecurityManager.createSelfSignedCertificate( alias, dn, strength );
           
            close(true );
           
            Logger.log(new LogAlert(LogAlert.UNREPEATABLE,
                LogAlert.AT_INFORMATION, MessageText
                    .getString("security.certcreate.createok")
                    + "\n" + alias + ":" + strength + "\n"
                    + dn + "\n" + SystemTime.getCurrentTime()));
           
          }catch( Throwable f ){
           
            Logger.log(new LogAlert(LogAlert.UNREPEATABLE, MessageText
                .getString("security.certcreate.createfail")
                + "\n" + SystemTime.getCurrentTime(), f));
          }
        }
      });
View Full Code Here

      try{
        ((ShareResource)shares[i]).delete();
       
      }catch( Throwable e ){
       
        Logger.log(new LogAlert(shares[i], false,
            "{globalmanager.download.remove.veto}", e));
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.core3.util.SHA1Hasher

Copyright © 2018 www.massapicom. 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.