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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) class
private class
-------------------- helper class to monitor test. -
Field Summary
FieldsModifier and TypeFieldDescription(package private) boolean
(package private) String
static final String
static final String
(package private) static NetworkAdminSpeedTesterResult
private final PluginInterface
private static TorrentAttribute
(package private) boolean
private boolean
(package private) static int
static final String
static final String
(package private) boolean
Fields inherited from interface com.biglybt.core.networkmanager.admin.NetworkAdminSpeedTester
TEST_TYPE_DOWNLOAD_ONLY, TEST_TYPE_UPLOAD_ONLY, TEST_TYPES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected void
(package private) static Double
autoboxDouble
(double d) (package private) static Long
autoboxLong
(long l) private static long
autoboxLong
(Long l) (package private) static long
void
protected static NetworkAdminSpeedTesterResult
int
getMode()
Get the result forint
boolean
protected static void
void
setMode
(int mode) (package private) 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.void
setUseCrypto
(boolean _use_crypto) void
The downloads have been stopped just need to do the testing.protected static void
startUp()
Methods inherited from class com.biglybt.core.networkmanager.admin.impl.NetworkAdminSpeedTesterImpl
addListener, removeListener, sendResultToListeners, sendStageUpdateToListeners
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.biglybt.core.networkmanager.admin.NetworkAdminSpeedTester
addListener, removeListener
-
Field Details
-
DOWNLOAD_AVE
- See Also:
-
UPLOAD_AVE
- See Also:
-
DOWNLOAD_STD_DEV
- See Also:
-
UPLOAD_STD_DEV
- See Also:
-
testMode
static int testMode -
speedTestAttrib
-
lastResult
-
plugin
-
test_started
private boolean test_started -
test_completed
boolean test_completed -
use_crypto
boolean use_crypto -
aborted
volatile boolean aborted -
deferred_abort
String deferred_abort
-
-
Constructor Details
-
NetworkAdminSpeedTesterBTImpl
- Parameters:
pi
- - PluginInterface is used to get Manager classes.
-
-
Method Details
-
initialise
protected static void initialise() -
startUp
protected static void startUp() -
getLastResult
-
getTestType
public int getTestType()- Specified by:
getTestType
in interfaceNetworkAdminSpeedTester
-
setMode
public void setMode(int mode) - Specified by:
setMode
in interfaceNetworkAdminSpeedTester
-
getMode
public int getMode()- Specified by:
getMode
in interfaceNetworkAdminSpeedTester
-
setUseCrypto
public void setUseCrypto(boolean _use_crypto) - Specified by:
setUseCrypto
in interfaceNetworkAdminSpeedTester
-
getUseCrypto
public boolean getUseCrypto()- Specified by:
getUseCrypto
in interfaceNetworkAdminSpeedTester
-
start
The downloads have been stopped just need to do the testing.- Parameters:
tot
- - Torrent received from testing service.
-
complete
-
abort
- Specified by:
abort
in classNetworkAdminSpeedTesterImpl
-
abort
- Specified by:
abort
in classNetworkAdminSpeedTesterImpl
-
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
-
autoboxLong
-
autoboxLong
-
autoboxDouble
-