net.sourceforge.speedcontrol.decider
Class SimpleDecider

java.lang.Object
  extended by net.sourceforge.speedcontrol.decider.SimpleDecider
All Implemented Interfaces:
Decider

public class SimpleDecider
extends java.lang.Object
implements Decider

Simple implementation of Decider interface. It keep track about the download rate of the last 5 seconds and uses the average of these 5 values to compute the recommendation for the new upload limit.


Constructor Summary
SimpleDecider(Configuration config)
           
 
Method Summary
 int getSuggestedUpRate()
          get hint about suggested upload rate.
 void updateCurrentStatus(int currentDownRate)
          updates the current download rate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleDecider

public SimpleDecider(Configuration config)
Method Detail

updateCurrentStatus

public void updateCurrentStatus(int currentDownRate)
Description copied from interface: Decider
updates the current download rate

Specified by:
updateCurrentStatus in interface Decider

getSuggestedUpRate

public int getSuggestedUpRate()
Description copied from interface: Decider
get hint about suggested upload rate.

Specified by:
getSuggestedUpRate in interface Decider


Copyright © 2006 null. All Rights Reserved.