OpenNMS API 1.2.3

org.opennms.protocols.snmp
Class SnmpTimeTicks

java.lang.Object
  extended byorg.opennms.protocols.snmp.SnmpUInt32
      extended byorg.opennms.protocols.snmp.SnmpTimeTicks
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable, SnmpSyntax

public class SnmpTimeTicks
extends SnmpUInt32

Defines a SNMPv1 32-bit time ticks object. The object is a 32-bit unsigned value that is incremented periodically by an agent using a specific timer interval. The object inherients and uses most of the methods defined by the SnmpUInt32 class. This class does not define any specific data, but is instead used to override the ASN.1 type of the base class.

Author:
Brian Weaver
See Also:
Serialized Form

Field Summary
static byte ASNTYPE
          Defines the ASN.1 type for this object.
(package private) static long serialVersionUID
          Defines the serialization format
 
Fields inherited from class org.opennms.protocols.snmp.SnmpUInt32
 
Constructor Summary
SnmpTimeTicks()
          Constructs the default counter object.
SnmpTimeTicks(long value)
          Constructs the object with the specified value.
SnmpTimeTicks(java.lang.Long value)
          Constructs the object with the specified value.
SnmpTimeTicks(SnmpTimeTicks second)
          Constructs a new object with the same value as the passed object.
SnmpTimeTicks(SnmpUInt32 uint32)
          Constructs a new object with the value constained in the SnmpUInt32 object.
SnmpTimeTicks(java.lang.String value)
           Simple class constructor that is used to create an initialize the new instance with the unsigned value decoded from the passed String argument.
 
Method Summary
 java.lang.Object clone()
          Creates a new object that is a duplicate of the current object.
 SnmpSyntax duplicate()
          Creates a new object that is a duplicate of the current object.
 java.lang.String toString()
          Returns the string representation of the object.
 byte typeId()
          Returns the ASN.1 type specific to this object.
 
Methods inherited from class org.opennms.protocols.snmp.SnmpUInt32
decodeASN, encodeASN, getValue, setValue, setValue
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
Defines the serialization format

See Also:
Constant Field Values

ASNTYPE

public static final byte ASNTYPE
Defines the ASN.1 type for this object.

See Also:
Constant Field Values
Constructor Detail

SnmpTimeTicks

public SnmpTimeTicks()
Constructs the default counter object. The initial value is defined by the super class default constructor


SnmpTimeTicks

public SnmpTimeTicks(long value)
Constructs the object with the specified value.

Parameters:
value - The default value for the object.

SnmpTimeTicks

public SnmpTimeTicks(java.lang.Long value)
Constructs the object with the specified value.

Parameters:
value - The default value for the object.

SnmpTimeTicks

public SnmpTimeTicks(SnmpTimeTicks second)
Constructs a new object with the same value as the passed object.

Parameters:
second - The object to recover values from.

SnmpTimeTicks

public SnmpTimeTicks(SnmpUInt32 uint32)
Constructs a new object with the value constained in the SnmpUInt32 object.

Parameters:
uint32 - The SnmpUInt32 object to copy.

SnmpTimeTicks

public SnmpTimeTicks(java.lang.String value)

Simple class constructor that is used to create an initialize the new instance with the unsigned value decoded from the passed String argument. If the decoded argument is malformed, null, or evaluates to a negative value then an exception is generated.

The value passed to the constructor should be the number of milliseconds since epoch, as defined by RFC 1155.

Parameters:
value - The string encoded value of TimeTicks
Throws:
java.lang.NumberFormatException - Thrown if the passed value is malformed and cannot be parsed.
java.lang.IllegalArgumentException - Throws if the passed value evaluates to a negative value.
java.lang.NullPointerException - Throws if the passed value is a null reference.
Method Detail

typeId

public byte typeId()
Returns the ASN.1 type specific to this object.

Specified by:
typeId in interface SnmpSyntax
Overrides:
typeId in class SnmpUInt32
Returns:
The ASN.1 value for this object.

duplicate

public SnmpSyntax duplicate()
Creates a new object that is a duplicate of the current object.

Specified by:
duplicate in interface SnmpSyntax
Overrides:
duplicate in class SnmpUInt32
Returns:
The newly created duplicate object.

clone

public java.lang.Object clone()
Creates a new object that is a duplicate of the current object.

Overrides:
clone in class SnmpUInt32
Returns:
The newly created duplicate object.

toString

public java.lang.String toString()
Returns the string representation of the object.

Overrides:
toString in class SnmpUInt32

OpenNMS API 1.2.3

Generated by eevans on May 29 2005 2015.