org.universAAL.lddi.zwave.exporter.Server
Class TransferRateCalculator

Package class diagram package TransferRateCalculator
java.lang.Object
  extended by java.util.TimerTask
      extended by org.universAAL.lddi.zwave.exporter.Server.TransferRateCalculator
All Implemented Interfaces:
Runnable

public class TransferRateCalculator
extends TimerTask

Class to calculate transfer rates.

Version:
$Rev: 5339 $ $Date: 2012-09-25 17:17:28 +0200 (mar, 25 sep 2012) $
Author:
fraperod

Field Summary
protected  long calculationPeriod
          TransferRateCalculator calculationPeriod milliseconds.
 
Constructor Summary
TransferRateCalculator()
          Constructor.
TransferRateCalculator(long calcPeriodMilisecons)
          Constructor.
 
Method Summary
 float getIncomingByteRate()
          Returns the incoming byte rate.
 float getOutgoingByteRate()
          Returns the outgoing byte rate.
 long getTotalIncomingBytes()
          Returns the total incoming bytes.
 long getTotalOutgoingBytes()
          Returns the total outgoing bytes.
 void newIncomingData(long dataSize)
          New data received.
 void newOutgoingData(long dataSize)
          New data sent.
 void run()
          Run.
 
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

calculationPeriod

protected long calculationPeriod
TransferRateCalculator calculationPeriod milliseconds.

Constructor Detail

TransferRateCalculator

public TransferRateCalculator()
Constructor.


TransferRateCalculator

public TransferRateCalculator(long calcPeriodMilisecons)
Constructor.

Parameters:
calcPeriodMilisecons - time to update calculations in milliseconds
Method Detail

getIncomingByteRate

public float getIncomingByteRate()
Returns the incoming byte rate.

Returns:
the incoming byte rate

getOutgoingByteRate

public float getOutgoingByteRate()
Returns the outgoing byte rate.

Returns:
the outgoing byte rate

getTotalIncomingBytes

public long getTotalIncomingBytes()
Returns the total incoming bytes.

Returns:
the total incoming bytes

getTotalOutgoingBytes

public long getTotalOutgoingBytes()
Returns the total outgoing bytes.

Returns:
the total outgoing bytes

newIncomingData

public void newIncomingData(long dataSize)
New data received.

Parameters:
dataSize - size of the new incoming data

newOutgoingData

public void newOutgoingData(long dataSize)
New data sent.

Parameters:
dataSize - size of the new outgoing data

run

public void run()
Run.

Specified by:
run in interface Runnable
Specified by:
run in class TimerTask


Copyright © 2014 universAAL Consortium. All Rights Reserved.