Overview | Package | Class | Tree | Deprecated | Index | Help
| SNMP Stack 5_1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.co.westhawk.snmp.stack
Class varbind

    java.lang.Object
      |
      +--uk.co.westhawk.snmp.stack.varbind

public class varbind
extends java.lang.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.9 $ $Date: 2006/01/17 17:43:54 $
Author:
  Tim Panton
See Also:
  `Pdu.addOid(varbind)`, `Pdu.addOid(String, AsnObject)`

Constructor Summary
`varbind(AsnObjectId Oid)` Constructor.
`varbind(AsnObjectId Oid, AsnObject val)` Constructor.
`varbind(java.lang.String Oid)` Constructor.
`varbind(java.lang.String Oid, AsnObject val)` Constructor.
`varbind(varbind var)` Constructor.

Method Summary
`AsnObjectId` | `getOid()` Returns the oid, this is the name of the varbind.
`AsnObject` | `getValue()` Returns the value of the varbind.
`java.lang.String` | `toString()` Returns the string representation of the varbind.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### varbind

    public varbind(varbind var)

  Constructor. It will clone the varbind given as parameter.

Parameters:
  `var` - The varbind

### varbind

    public varbind(java.lang.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:
  `AsnNull`

### 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:
  `AsnNull`

### varbind

    public varbind(java.lang.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 Detail

### 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 java.lang.String toString()

  Returns the string representation of the varbind.

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    The string of the varbind

Overview | Package | Class | Tree | Deprecated | Index | Help
| SNMP Stack 5_1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD