us.ihmc.mockets
Class Mocket.Statistics

java.lang.Object
  extended by us.ihmc.mockets.Mocket.Statistics
Enclosing class:
Mocket

public class Mocket.Statistics
extends java.lang.Object

The class that contains statistics about an active mocket connection. Obtained by calling getStatistics on an instance of Mocket.


Constructor Summary
Mocket.Statistics()
           
 
Method Summary
 long getDuplicatedDiscardedPacketCount()
          Returns the number of incoming packets that were discarded because they were duplicates.
 long getNoRoomDiscardedPacketCount()
          Returns the number of incoming packets that were discarded because there was no room to buffer them.
 long getReceivedByteCount()
          Returns the number of bytes received during this mocket connection.
 long getReceivedPacketCount()
          Returns the number of packets received during this mocket connection.
 long getRetransmittedPacketCount()
          Returns the number of retransmitted packets during this mocket connection
 long getSentByteCount()
          Returns the number of bytes transmitted during this mocket connection.
 long getSentPacketCount()
          Returns the number of sent packets during this mocket connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mocket.Statistics

public Mocket.Statistics()
Method Detail

getRetransmittedPacketCount

public long getRetransmittedPacketCount()
                                 throws java.io.IOException,
                                        java.lang.IllegalArgumentException
Returns the number of retransmitted packets during this mocket connection

Returns:
number of retransmitted packets; -1 if it is unable to get a MocketStats object.
Throws:
java.io.IOException
java.lang.IllegalArgumentException
See Also:
Mocket.getStatistics()

getSentPacketCount

public long getSentPacketCount()
                        throws java.io.IOException,
                               java.lang.IllegalArgumentException
Returns the number of sent packets during this mocket connection. Includes the first transmission of packets from pending packet queue and also retransmissions of packets from unacknowledged packet queue.

Returns:
number of sent packets; -1 if it is unable to get a MocketStats object.
Throws:
java.io.IOException
java.lang.IllegalArgumentException
See Also:
Mocket.getStatistics()

getSentByteCount

public long getSentByteCount()
                      throws java.io.IOException,
                             java.lang.IllegalArgumentException
Returns the number of bytes transmitted during this mocket connection. Does not include retransmissions. The number of bytes in each packet are evaluated only once when the packet is initially inserted into pending packet queue.

Returns:
number of byte transmitted; -1 if it is unable to get a MocketStats object.
Throws:
java.io.IOException
java.lang.IllegalArgumentException
See Also:
Mocket.getStatistics()

getReceivedPacketCount

public long getReceivedPacketCount()
                            throws java.io.IOException,
                                   java.lang.IllegalArgumentException
Returns the number of packets received during this mocket connection. Includes duplicate packets.

Returns:
number of received packets; -1 if it is unable to get a MocketStats object.
Throws:
java.io.IOException
java.lang.IllegalArgumentException
See Also:
Mocket.getStatistics()

getReceivedByteCount

public long getReceivedByteCount()
                          throws java.io.IOException,
                                 java.lang.IllegalArgumentException
Returns the number of bytes received during this mocket connection. Does not include bytes from duplicate packets.

Returns:
number of bytes received; -1 if it is unable to get a MocketStats object.
Throws:
java.io.IOException
java.lang.IllegalArgumentException
See Also:
Mocket.getStatistics()

getDuplicatedDiscardedPacketCount

public long getDuplicatedDiscardedPacketCount()
                                       throws java.io.IOException,
                                              java.lang.IllegalArgumentException
Returns the number of incoming packets that were discarded because they were duplicates.

Returns:
number of duplicated packets; -1 if it is unable to get a MocketStats object.
Throws:
java.io.IOException
java.lang.IllegalArgumentException
See Also:
Mocket.getStatistics()

getNoRoomDiscardedPacketCount

public long getNoRoomDiscardedPacketCount()
                                   throws java.io.IOException,
                                          java.lang.IllegalArgumentException
Returns the number of incoming packets that were discarded because there was no room to buffer them.

Returns:
number of packets discarded; -1 if it is unable to get a MocketStats object.
Throws:
java.io.IOException
java.lang.IllegalArgumentException
See Also:
Mocket.getStatistics()