snmp
Class SNMPCounter32

java.lang.Object
  extended bysnmp.SNMPObject
      extended bysnmp.SNMPInteger
          extended bysnmp.SNMPCounter32

public class SNMPCounter32
extends SNMPInteger

Defines a 32-bit counter, whose value wraps if initialized with a larger value. For an indicator which "pegs" at its maximum value if initialized with a larger value, use SNMPGauge32; for a counter with a wider range, use SNMPCounter64.

See Also:
SNMPGauge32, SNMPCounter64

Field Summary
 
Fields inherited from class snmp.SNMPInteger
tag, value
 
Constructor Summary
  SNMPCounter32()
          Initialize value to 0.
protected SNMPCounter32(byte[] enc)
          Used to initialize from the BER encoding, usually received in a response from an SNMP device responding to an SNMPGetRequest.
  SNMPCounter32(long newValue)
           
 
Method Summary
 void setValue(java.lang.Object newValue)
          Used to set the value with an instance of java.lang.Integer or java.lang.BigInteger.
 
Methods inherited from class snmp.SNMPInteger
extractValueFromBEREncoding, getBEREncoding, getValue, toString, toString
 
Methods inherited from class snmp.SNMPObject
equals, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SNMPCounter32

public SNMPCounter32()
Initialize value to 0.


SNMPCounter32

public SNMPCounter32(long newValue)

SNMPCounter32

protected SNMPCounter32(byte[] enc)
                 throws SNMPBadValueException
Used to initialize from the BER encoding, usually received in a response from an SNMP device responding to an SNMPGetRequest.

Throws:
SNMPBadValueException - Indicates an invalid BER encoding supplied. Shouldn't occur in normal operation, i.e., when valid responses are received from devices.
Method Detail

setValue

public void setValue(java.lang.Object newValue)
              throws SNMPBadValueException
Used to set the value with an instance of java.lang.Integer or java.lang.BigInteger. The value of the constructed SNMPCounter32 object is the supplied value mod 2^32.

Overrides:
setValue in class SNMPInteger
Throws:
SNMPBadValueException - Indicates an incorrect object type supplied.