Class NetworkAdminSpeedTestScheduledTestImpl.SpeedTestDownloadState

    • Field Detail

      • torrentLimits

        private final java.util.Map torrentLimits
      • TORRENT_UPLOAD_LIMIT

        public static final java.lang.String TORRENT_UPLOAD_LIMIT
        See Also:
        Constant Field Values
      • TORRENT_DOWNLOAD_LIMIT

        public static final java.lang.String TORRENT_DOWNLOAD_LIMIT
        See Also:
        Constant Field Values
      • maxUploadKbs

        int maxUploadKbs
      • maxUploadSeedingKbs

        int maxUploadSeedingKbs
      • maxDownloadKbs

        int maxDownloadKbs
      • autoSpeedEnabled

        boolean autoSpeedEnabled
      • autoSpeedSeedingEnabled

        boolean autoSpeedSeedingEnabled
      • LANSpeedEnabled

        boolean LANSpeedEnabled
    • Constructor Detail

      • SpeedTestDownloadState

        public SpeedTestDownloadState()
    • Method Detail

      • parameterChanged

        public void parameterChanged​(java.lang.String name)
        Description copied from interface: ParameterListener
        Called, when a parameter has changed. The listener could only react if the parameter name is relevant. Or the listener can just read all parameters again.
        Specified by:
        parameterChanged in interface ParameterListener
        Parameters:
        name - the name of the parameter that has changed
      • saveLimits

        public void saveLimits()
      • restoreLimits

        public void restoreLimits()
      • saveGlobalLimits

        private void saveGlobalLimits()
        Get the global limits from the TransferSpeedValidator class. Call before starting a speed test.
      • restoreGlobalLimits

        private void restoreGlobalLimits()
        Call this method after a speed test completes to restore the global limits.
      • restoreIndividualLimits

        private void restoreIndividualLimits()
        Call this method after the speed test is completed to restore the individual download limits before the test started.
      • setDownloadDetails

        private void setDownloadDetails​(Download d,
                                        int uploadLimit,
                                        int downloadLimit)
        Save the upload/download limits of this Download object before the test started.
        Parameters:
        d - - Download
        uploadLimit - - int
        downloadLimit - - int
      • getDownloadDetails

        private int getDownloadDetails​(Download d,
                                       java.lang.String param)
        Get the upload or download limit for this Download object before the test started.
        Parameters:
        d - - Download
        param - - String
        Returns:
        - limit as int.
      • getAllDownloads

        private Download[] getAllDownloads()
        Get all the Download keys in this Map.
        Returns:
        - Download[]