|
MySnmpCrawler API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.opennms.protocols.snmp.SnmpVarBind | +--snmp.message.pdu.SnmpVariable
The SnmpVariable class represents the binded variable in the PDU. It contains the paring of the OID and the value of the variable.
Field Summary | |
private SnmpOid |
oid
|
private SnmpPdu |
pdu
|
private SnmpValue |
value
|
Fields inherited from class org.opennms.protocols.snmp.SnmpVarBind |
ASNTYPE |
Constructor Summary | |
SnmpVariable()
The default Constructor. |
|
SnmpVariable(SnmpPdu pdu)
Constructs the SnmpVariable object with the PDU that contains it. |
|
SnmpVariable(java.lang.String strOid)
Constructs the SnmpVariable object with the OID string. |
Method Summary | |
int |
decode(byte[] buf,
int offset,
org.opennms.protocols.snmp.asn1.BerEncoder encoder)
Decodes the binded variables from the passed ASN.1 buffer. |
int |
encode(byte[] buf,
int offset,
org.opennms.protocols.snmp.asn1.BerEncoder encoder)
Encodes the SnmpVariable object into the passed buffer. |
SnmpOid |
getSnmpOid()
Gets the SnmpOid object of the variable. |
SnmpPdu |
getSnmpPdu()
Gets the SnmpPdu object that contains the variable. |
SnmpValue |
getSnmpValue()
Gets the SnmpValue object of the variable. |
java.lang.String |
toString()
Gets the string representation of the SnmpVariable object. |
Methods inherited from class org.opennms.protocols.snmp.SnmpVarBind |
clone, decodeASN, duplicate, encodeASN, getName, getValue, setName, setName, setValue, typeId |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private SnmpOid oid
private SnmpValue value
private SnmpPdu pdu
Constructor Detail |
public SnmpVariable()
public SnmpVariable(SnmpPdu pdu)
pdu
- The PDU that contains the variable.public SnmpVariable(java.lang.String strOid)
Method Detail |
public SnmpOid getSnmpOid()
public SnmpValue getSnmpValue()
public SnmpPdu getSnmpPdu()
public int decode(byte[] buf, int offset, org.opennms.protocols.snmp.asn1.BerEncoder encoder) throws org.opennms.protocols.snmp.SnmpPduEncodingException, org.opennms.protocols.snmp.asn1.AsnDecodingException
buf
- Encoded ASN.1 dataoffset
- Offset to first byte of encoded dataencoder
- The encoder used to convert the data
AnsDecodingException
- Thrown if an error occurs while
attempting to decode the data. This exception will be
thrown byte encoder object.
org.opennms.protocols.snmp.SnmpPduEncodingException
org.opennms.protocols.snmp.asn1.AsnDecodingException
public int encode(byte[] buf, int offset, org.opennms.protocols.snmp.asn1.BerEncoder encoder) throws org.opennms.protocols.snmp.SnmpPduEncodingException, org.opennms.protocols.snmp.asn1.AsnEncodingException
buf
- Storeage for the encoded dataoffset
- Offset to start encoding dataencoder
- The encoder used to convert the data
AnsEncodingException
- Thrown if the encoder encounters
an error while building the buffer.
org.opennms.protocols.snmp.SnmpPduEncodingException
org.opennms.protocols.snmp.asn1.AsnEncodingException
public java.lang.String toString()
toString
in class org.opennms.protocols.snmp.SnmpVarBind
|
MySnmpCrawler API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |