|
HOME | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ireasoning.protocol.snmp.SnmpUInt com.ireasoning.protocol.snmp.SnmpCounter32
The class represents snmp Counter32 type object. The Counter32 type represents a non-negative integer which monotonically increases until it reaches a maximum value of 2^32-1 (4294967295 decimal), when it wraps around and starts increasing again from zero.
Field Summary | |
static SnmpCounter32 |
MAX_VALUE
A constant holding the maximum value an SnmpCounter32 can have |
Fields inherited from interface com.ireasoning.protocol.snmp.SnmpDataType |
BITS, BITSTRING, COUNTER32, COUNTER64, END_OF_MIB_VIEW, END_OF_MIB_VIEW_OBJECT, GAUGE32, INTEGER, IPADDRESS, NO_SUCH_INSTANCE, NO_SUCH_INSTANCE_OBJECT, NO_SUCH_OBJECT, NO_SUCH_OBJECT_OBJECT, NULL, OCTETSTRING, OID, OPAQUE, PDU, SEQUENCE, SEQUENCEOF, serialVersionUID, TIMETICKS, UNSIGNED32, VARBIND |
Fields inherited from interface com.ireasoning.protocol.Msg |
ERROR_TYPE |
Constructor Summary | |
SnmpCounter32()
Constructs a new SnmpCounter32 object |
|
SnmpCounter32(long counter)
Constructs an SnmpCounter32 object based on passed counter |
|
SnmpCounter32(SnmpCounter32 counter32)
Constructs a copy of passed-in SnmpCounter32 object. |
|
SnmpCounter32(SnmpUInt uint32)
Constructs an SnmpCounter32 object based on the passed-in SnmpUInt object. |
|
SnmpCounter32(String counter)
Constructs an SnmpCounter32 object based on passed counter |
Method Summary | |
SnmpDataType |
copy()
Makes a copy of itself |
int |
encode(com.ireasoning.protocol.snmp.SnmpEncoder encoder)
For internal use |
int |
getType()
Returns SnmpDataType.COUNTER32 |
String |
getTypeString()
Returns "Counter32" |
void |
inc()
Increments counter value by 1, wrap around if it reaches max. |
void |
inc(long val)
Increments counter value by val, wrap around if it reaches max. |
void |
setValue(long value)
Sets a new value |
String |
toString()
|
Methods inherited from class com.ireasoning.protocol.snmp.SnmpUInt |
equals, getValue, hashCode |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final SnmpCounter32 MAX_VALUE
Constructor Detail |
public SnmpCounter32()
public SnmpCounter32(String counter)
public SnmpCounter32(long counter)
public SnmpCounter32(SnmpCounter32 counter32)
counter32
- an SnmpCounter32 object to be copied.public SnmpCounter32(SnmpUInt uint32)
uint32
- The SnmpUInt object to copy.Method Detail |
public int getType()
getType
in interface SnmpDataType
getType
in class SnmpUInt
public String getTypeString()
getTypeString
in interface SnmpDataType
getTypeString
in class SnmpUInt
public void inc(long val)
UnsupportedOperationException
- if called for SnmpCounter32.MAX_VALUEpublic void inc()
UnsupportedOperationException
- if called for SnmpCounter32.MAX_VALUEpublic void setValue(long value)
setValue
in class SnmpUInt
UnsupportedOperationException
- if called for SnmpCounter32.MAX_VALUEpublic String toString()
toString
in class SnmpUInt
public SnmpDataType copy()
SnmpDataType
copy
in interface SnmpDataType
copy
in class SnmpUInt
public int encode(com.ireasoning.protocol.snmp.SnmpEncoder encoder) throws SnmpEncodingException
SnmpDataType
encode
in interface SnmpDataType
encode
in class SnmpUInt
SnmpEncodingException
|
HOME | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |