org.ccnx.ccn.impl.CCNStats.ExampleClassWithStatistics Class Reference

List of all members.

Public Types

enum  MyStats { SendRequests = ("packets", "The number of packets sent"), RecvMessages = ("packets", "The number of packets received"), SendRate = ("packets per second", "The average of packet/sec transmits"), BytesPerPacket = ("bytes per packet", "The average of bytes per packet transmits") }

Public Member Functions

void send (Object o, int len)
void recv (Object o)
CCNStats getStats ()
 Implement the IStatsEnum interface.

Package Attributes

CCNEnumStats< MyStats > _stats = new CCNEnumStats<MyStats>(MyStats.SendRequests)
 Instantiate our stats counter.

Member Data Documentation

CCNEnumStats<MyStats> org.ccnx.ccn.impl.CCNStats.ExampleClassWithStatistics._stats = new CCNEnumStats<MyStats>(MyStats.SendRequests) [package]

Instantiate our stats counter.

Note that we need to pass a Java generic type for our Enum and then pass an instance of the Enum to the constructor. It does not matter which enum value we pass to the constructor, it just needs a concrete object it can reference.


The documentation for this class was generated from the following file:
Generated on Tue Aug 21 14:55:18 2012 for Content-Centric Networking in Java by  doxygen 1.6.3