Class NetworkAdminSpeedTestSchedulerImpl
- java.lang.Object
-
- com.biglybt.core.networkmanager.admin.impl.NetworkAdminSpeedTestSchedulerImpl
-
- All Implemented Interfaces:
NetworkAdminSpeedTestScheduler
public class NetworkAdminSpeedTestSchedulerImpl extends java.lang.Object implements NetworkAdminSpeedTestScheduler
-
-
Field Summary
Fields Modifier and Type Field Description (package private) NetworkAdminSpeedTestScheduledTestImpl
currentTest
private static NetworkAdminSpeedTestSchedulerImpl
instance
-
Fields inherited from interface com.biglybt.core.networkmanager.admin.NetworkAdminSpeedTestScheduler
TEST_TYPE_BT
-
-
Constructor Summary
Constructors Modifier Constructor Description private
NetworkAdminSpeedTestSchedulerImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NetworkAdminSpeedTestScheduledTest
getCurrentTest()
returns the currently scheduled test, null if nonestatic NetworkAdminSpeedTestScheduler
getInstance()
NetworkAdminSpeedTesterResult
getLastResult(int type)
Get the most recent result for the test.void
initialise()
If system crashes on start-up, then speed tests torrents need to be cleaned on start-up etc - call this method on start to allow thisNetworkAdminSpeedTestScheduledTest
scheduleTest(int type)
Request a test using the testing service.
-
-
-
Field Detail
-
instance
private static NetworkAdminSpeedTestSchedulerImpl instance
-
currentTest
NetworkAdminSpeedTestScheduledTestImpl currentTest
-
-
Method Detail
-
getInstance
public static NetworkAdminSpeedTestScheduler getInstance()
-
initialise
public void initialise()
Description copied from interface:NetworkAdminSpeedTestScheduler
If system crashes on start-up, then speed tests torrents need to be cleaned on start-up etc - call this method on start to allow this- Specified by:
initialise
in interfaceNetworkAdminSpeedTestScheduler
-
getCurrentTest
public NetworkAdminSpeedTestScheduledTest getCurrentTest()
Description copied from interface:NetworkAdminSpeedTestScheduler
returns the currently scheduled test, null if none- Specified by:
getCurrentTest
in interfaceNetworkAdminSpeedTestScheduler
- Returns:
- - NetworkAdminSpeedTestScheduledTest
-
scheduleTest
public NetworkAdminSpeedTestScheduledTest scheduleTest(int type) throws NetworkAdminException
Description copied from interface:NetworkAdminSpeedTestScheduler
Request a test using the testing service.- Specified by:
scheduleTest
in interfaceNetworkAdminSpeedTestScheduler
- Parameters:
type
- - ID for the type of test - use abouve constants- Returns:
- boolean - true if a success, otherwise false.
- Throws:
NetworkAdminException
- -
-
getLastResult
public NetworkAdminSpeedTesterResult getLastResult(int type)
Get the most recent result for the test.- Specified by:
getLastResult
in interfaceNetworkAdminSpeedTestScheduler
- Parameters:
type
- - ID for the type of test - use abouve constants- Returns:
- - Result
-
-