All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Snmp.SnmpCounter

java.lang.Object
   |
   +----Snmp.SnmpVar
           |
           +----Snmp.SnmpUnsignedInt
                   |
                   +----Snmp.SnmpCounter

public class SnmpCounter
extends SnmpUnsignedInt
Class of SNMP Counter Variable - Sub-class of SnmpUnsignedInt The superclass's toString() and longValue() methods will be used often.

The getIncrement() methods will be useful in getting incremental values when polling counters.


Constructor Index

 o SnmpCounter(long)
Constructor requires a long as it's argument

Method Index

 o getIncrement(long)
Get the (positive) increment of this Counter variable over a long.
 o getIncrement(SnmpCounter)
Get the (positive) increment of this Counter variable over another.
 o toTagString()
To convert the object to a printable string tagged with Counter:

Constructors

 o SnmpCounter
 public SnmpCounter(long s)
Constructor requires a long as it's argument

Methods

 o toTagString
 public String toTagString()
To convert the object to a printable string tagged with Counter:

Overrides:
toTagString in class SnmpUnsignedInt
 o getIncrement
 public long getIncrement(SnmpCounter c)
Get the (positive) increment of this Counter variable over another. Take care of wraparound by adding the MAX counter value if negative

 o getIncrement
 public long getIncrement(long lastValue)
Get the (positive) increment of this Counter variable over a long. Take care of wraparound by adding the MAX counter value if negative


All Packages  Class Hierarchy  This Package  Previous  Next  Index