com.adventnet.snmp.snmp2
Class SnmpVarBind

java.lang.Object
  |
  +--com.adventnet.snmp.snmp2.SnmpVarBind
All Implemented Interfaces:
java.io.Serializable

public class SnmpVarBind
extends java.lang.Object
implements java.io.Serializable

Class of SNMP Variable Binding. It contains an object identifier and an SnmpVar.

See Also:
Serialized Form

Constructor Summary
SnmpVarBind(SnmpOID objectID, SnmpVar var)
          Create the variable binding with given Object ID and Variable
 
Method Summary
 boolean equals(java.lang.Object obj)
          Returns true if this SnmpVarBind object and the incoming SnmpVarBind object are same in their contents and false otherwise.
 int getErrindex()
          Return error in variable binding in response pdu.
 SnmpOID getObjectID()
          Return the object identifier in the SnmpVarBind.
 SnmpVar getVariable()
          Return the variable in the SnmpVarBind.
 void setObjectID(SnmpOID objectId)
          Sets the object identifier in the SnmpVarBind.
 void setVariable(SnmpVar var)
          Sets the variable in the SnmpVarBind.
 java.lang.String toString()
          To convert the VarBind to a printable string Object ID: value
 java.lang.String toTagString()
          To convert the VarBind to a printable string on two lines, the first with Object ID: oid and the second with TYPE: value
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SnmpVarBind

public SnmpVarBind(SnmpOID objectID,
                   SnmpVar var)
Create the variable binding with given Object ID and Variable
Method Detail

getObjectID

public SnmpOID getObjectID()
Return the object identifier in the SnmpVarBind.

setObjectID

public void setObjectID(SnmpOID objectId)
Sets the object identifier in the SnmpVarBind.

getVariable

public SnmpVar getVariable()
Return the variable in the SnmpVarBind.

setVariable

public void setVariable(SnmpVar var)
Sets the variable in the SnmpVarBind.

getErrindex

public int getErrindex()
Return error in variable binding in response pdu. To store the exception value in the v2c agent's response pdu. Unlike in SnmpV1, there are some exception responses in SnmpV2 where the errstat is set to zero and the tag value of the variable field in the varbind is set to an exception value

toString

public java.lang.String toString()
To convert the VarBind to a printable string Object ID: value
Overrides:
toString in class java.lang.Object

toTagString

public java.lang.String toTagString()
To convert the VarBind to a printable string on two lines, the first with Object ID: oid and the second with TYPE: value

equals

public boolean equals(java.lang.Object obj)
Returns true if this SnmpVarBind object and the incoming SnmpVarBind object are same in their contents and false otherwise.
Overrides:
equals in class java.lang.Object


Copyright (c)AdventNet Inc., 1996-2004