anon.client
Class PacketCounter

java.lang.Object
  extended by java.util.Observable
      extended by anon.client.PacketCounter
All Implemented Interfaces:
java.util.Observer

public class PacketCounter
extends java.util.Observable
implements java.util.Observer

Author:
Stefan Lieske

Field Summary
private  java.lang.Object m_internalSynchronization
           
private  long m_payPacketCounter
          This counts the packets which have to be paid.
private  long m_processedDataPackets
          This counts the data-packets for the observers of this class.
 
Constructor Summary
PacketCounter()
           
PacketCounter(long a_processedPackets)
           
 
Method Summary
 long getAndResetBytesForPayment()
           
 long getProcessedPackets()
           
 void update(java.util.Observable a_object, java.lang.Object a_argument)
           
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_processedDataPackets

private volatile long m_processedDataPackets
This counts the data-packets for the observers of this class.


m_payPacketCounter

private volatile long m_payPacketCounter
This counts the packets which have to be paid.


m_internalSynchronization

private java.lang.Object m_internalSynchronization
Constructor Detail

PacketCounter

public PacketCounter(long a_processedPackets)

PacketCounter

public PacketCounter()
Method Detail

update

public void update(java.util.Observable a_object,
                   java.lang.Object a_argument)
Specified by:
update in interface java.util.Observer

getProcessedPackets

public long getProcessedPackets()

getAndResetBytesForPayment

public long getAndResetBytesForPayment()