Class varbind

java.lang.Object
uk.co.westhawk.snmp.stack.varbind

public class varbind extends Object

This class represents the variable bindings to a PDU. A variable consists of a name (an AsnObjectId) and a value (an AsnObject)

The varbind is usually passed to the Observers of the PDU when notifying them.

Version:
$Revision: 3.10 $ $Date: 2007/10/17 10:47:47 $
Author:
Tim Panton
See Also:
  • Constructor Details

    • varbind

      public varbind(varbind var)
      Constructor. It will clone the varbind given as parameter.
      Parameters:
      var - The varbind
    • varbind

      public varbind(String Oid)
      Constructor. The name will be set to the Oid, the value will be set to AsnNull. This is usually used in Get or GetNext requests.
      Parameters:
      Oid - The oid
      See Also:
    • varbind

      public varbind(AsnObjectId Oid)
      Constructor. The name will be set to the Oid, the value will be set to AsnNull. This is usually used in Get or GetNext requests.
      Parameters:
      Oid - The oid
      See Also:
    • varbind

      public varbind(String Oid, AsnObject val)
      Constructor. The name and value will be set. This is usually used in Set requests.
      Parameters:
      Oid - The oid
      val - The value for the varbind
    • varbind

      public varbind(AsnObjectId Oid, AsnObject val)
      Constructor. The name and value will be set. This is usually used in Set requests.
      Parameters:
      Oid - The oid
      val - The value for the varbind
      Since:
      4_12
  • Method Details

    • getOid

      public AsnObjectId getOid()
      Returns the oid, this is the name of the varbind.
      Returns:
      the name as an AsnObjectId
    • getValue

      public AsnObject getValue()
      Returns the value of the varbind.
      Returns:
      the value as AsnObject
    • toString

      public String toString()
      Returns the string representation of the varbind.
      Overrides:
      toString in class Object
      Returns:
      The string of the varbind