|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.hermesftp.utils.TransferRateLimiter
public class TransferRateLimiter
Controls the upload/download bandwidth.
Constructor Summary | |
---|---|
TransferRateLimiter()
Constructor. |
|
TransferRateLimiter(double maxRate)
Constructor. |
Method Summary | |
---|---|
void |
execute(long byteCount)
Updates the transfer rate statistics. |
double |
getCurrentTransferRate()
Returns the current transfer rate. |
void |
init(double maxRate)
Initializes the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TransferRateLimiter()
public TransferRateLimiter(double maxRate)
maxRate
- KB per second.Method Detail |
---|
public void init(double maxRate)
maxRate
- The maximum transfer rate.public double getCurrentTransferRate()
public void execute(long byteCount)
byteCount
- The number of bytes previously transfered.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |