Class NetworkAdminSpeedTesterBTImpl

java.lang.Object
com.biglybt.core.networkmanager.admin.impl.NetworkAdminSpeedTesterImpl
com.biglybt.core.networkmanager.admin.impl.NetworkAdminSpeedTesterBTImpl
All Implemented Interfaces:
NetworkAdminSpeedTester

public class NetworkAdminSpeedTesterBTImpl extends NetworkAdminSpeedTesterImpl implements NetworkAdminSpeedTester
  • Field Details

  • Constructor Details

    • NetworkAdminSpeedTesterBTImpl

      public NetworkAdminSpeedTesterBTImpl(PluginInterface pi)
      Parameters:
      pi - - PluginInterface is used to get Manager classes.
  • Method Details

    • initialise

      protected static void initialise()
    • startUp

      protected static void startUp()
    • getLastResult

      protected static NetworkAdminSpeedTesterResult getLastResult()
    • getTestType

      public int getTestType()
      Specified by:
      getTestType in interface NetworkAdminSpeedTester
    • setMode

      public void setMode(int mode)
      Specified by:
      setMode in interface NetworkAdminSpeedTester
    • getMode

      public int getMode()
      Specified by:
      getMode in interface NetworkAdminSpeedTester
    • setUseCrypto

      public void setUseCrypto(boolean _use_crypto)
      Specified by:
      setUseCrypto in interface NetworkAdminSpeedTester
    • getUseCrypto

      public boolean getUseCrypto()
      Specified by:
      getUseCrypto in interface NetworkAdminSpeedTester
    • start

      public void start(TOTorrent tot)
      The downloads have been stopped just need to do the testing.
      Parameters:
      tot - - Torrent received from testing service.
    • complete

      public void complete(NetworkAdminSpeedTesterResult result)
    • abort

      protected void abort(String reason, Throwable cause)
      Specified by:
      abort in class NetworkAdminSpeedTesterImpl
    • abort

      public void abort(String reason)
      Specified by:
      abort in class NetworkAdminSpeedTesterImpl
    • getResult

      public NetworkAdminSpeedTesterResult getResult()
      Get the result for
      Returns:
      Result object of speed test.
    • setStartPieceBasedOnMode

      static int setStartPieceBasedOnMode(int mode, int totalPieces)
      Depending on the mode we want to upload all the set all, none or only half the pieces to done.
      Parameters:
      mode - - int that maps to NetworkAdminSpeedTestScheduler.TEST_TYPE...
      totalPieces - - total pieces in this test torrent.
      Returns:
      - int - the starting piece number to setDone to true.
    • autoboxLong

      static long autoboxLong(Object o)
    • autoboxLong

      private static long autoboxLong(Long l)
    • autoboxLong

      static Long autoboxLong(long l)
    • autoboxDouble

      static Double autoboxDouble(double d)