|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.limegroup.gnutella.statistics.AbstractStatHandler
Abstract class that is a general implementation of a message statistics handling class. These classes track multiple statistics at once. For a given message, this includes keeping track of the raw number of messages past, the number of bytes past, and whether or not that message was from another LimeWire.
Field Summary | |
Statistic |
BANDWIDTH_BYTE_STAT
Statistic for the bandwidth stat to also record message data to. |
Statistic |
BYTE_STAT
The Statistic for the number of bytes for this message type. |
Statistic |
LIME_BYTE_STAT
Statistic for the bytes of the given message that came from other LimeWires. |
Statistic |
LIME_NUMBER_STAT
Statistic for the number of the given message that came from other LimeWires. |
Statistic |
NUMBER_STAT
The Statistic that should be incremented for each new message. |
protected static StatisticsManager |
STATS_MANAGER
Constant for the StatisticsManager for use in subclasses. |
Constructor Summary | |
protected |
AbstractStatHandler(Statistic numberStat,
Statistic byteStat,
Statistic limeNumberStat,
Statistic limeByteStat)
Creates a new ReceivedMessageStatHandler instance. |
protected |
AbstractStatHandler(Statistic numberStat,
Statistic byteStat,
Statistic limeNumberStat,
Statistic limeByteStat,
Statistic bandwidthByteStat)
Creates a new ReceivedMessageStatHandler instance. |
protected |
AbstractStatHandler(java.lang.String fileName)
No argument constructor simply creates new stats classes for all required fields. |
Method Summary | |
void |
addMessage(Message msg)
Adds the specified Message to the stored data |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public final Statistic NUMBER_STAT
public final Statistic BYTE_STAT
public final Statistic LIME_NUMBER_STAT
public final Statistic LIME_BYTE_STAT
public final Statistic BANDWIDTH_BYTE_STAT
protected static final StatisticsManager STATS_MANAGER
Constructor Detail |
protected AbstractStatHandler(java.lang.String fileName)
protected AbstractStatHandler(Statistic numberStat, Statistic byteStat, Statistic limeNumberStat, Statistic limeByteStat, Statistic bandwidthByteStat)
numberStat
- the statistic that is simply incremented with
each new messagebyteStat
- the statistic for keeping track of the total bytesprotected AbstractStatHandler(Statistic numberStat, Statistic byteStat, Statistic limeNumberStat, Statistic limeByteStat)
numberStat
- the statistic that is simply incremented with
each new messagebyteStat
- the statistic for keeping track of the total bytesMethod Detail |
public void addMessage(Message msg)
msg
- the received Message to add to the data
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |