forward.server
Class TransferVolume

java.lang.Object
  extended by forward.server.TransferVolume

public class TransferVolume
extends java.lang.Object

This class stores an amount of transfered bytes and when this transfer was done. So we can use the information for calculating bandwidth usage for a specified time interval.


Field Summary
private  long m_timeStamp
          Stores the timestamp, when the transfer was done.
private  int m_transferedBytes
          Stores the number of transfered bytes.
 
Constructor Summary
TransferVolume(int a_volume)
          Creates a new instance of TransferVolume.
 
Method Summary
 long getTimeStamp()
          Returns the timestamp, when this TransferVolume was created (the transfer was done).
 int getVolume()
          Returns the number of transfered bytes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_transferedBytes

private int m_transferedBytes
Stores the number of transfered bytes.


m_timeStamp

private long m_timeStamp
Stores the timestamp, when the transfer was done.

Constructor Detail

TransferVolume

public TransferVolume(int a_volume)
Creates a new instance of TransferVolume. The amoun of transfered bytes is set to the given volume. The timestamp is set to the current system time.

Parameters:
a_volume - The amount of transfered bytes.
Method Detail

getVolume

public int getVolume()
Returns the number of transfered bytes.

Returns:
The number of transfered bytes.

getTimeStamp

public long getTimeStamp()
Returns the timestamp, when this TransferVolume was created (the transfer was done).

Returns:
The time the transfer was finished.