|
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.SnmpObjectId | +--snmp.message.pdu.SnmpOid
The SnmpOid class represents an SNMP object identifier. It provides the ASN.1 syntax value of the object identifier and also the OID record in the MIB database matched to the object identifier.
Field Summary | |
private java.lang.String |
oid
|
private OidRecord |
oidRecord
|
private SnmpVariable |
snmpVar
|
Fields inherited from class org.opennms.protocols.snmp.SnmpObjectId |
ASNTYPE |
Constructor Summary | |
(package private) |
SnmpOid()
The default Constructor. |
|
SnmpOid(SnmpOid snmpOid)
The copy Constructor constructs the SnmpOid object that is identical to the passed object. |
|
SnmpOid(SnmpVariable snmpVar)
Constructs the SnmpOid object with the SnmpVariable object that contains it. |
|
SnmpOid(java.lang.String oid)
Constructs the SnmpOid object with the OID string. |
Method Summary | |
int |
decode(byte[] buf,
int offset,
org.opennms.protocols.snmp.asn1.BerEncoder encoder)
Decodes the object identifier from the passed buffer. |
int |
encode(byte[] buf,
int offset,
org.opennms.protocols.snmp.asn1.BerEncoder encoder)
Encodes the object identifier using the passed encoder and stores the results in the passed buffer. |
java.lang.String |
getOid()
Gets the OID string. |
OidRecord |
getOidRecord()
Gets the OID record from the MIB database matched to the SnmpOid object. |
Methods inherited from class org.opennms.protocols.snmp.SnmpObjectId |
append, append, append, clone, compare, compare, compare, decodeASN, duplicate, encodeASN, equals, getIdentifiers, getLength, hashCode, isRootOf, prepend, prepend, prepend, setIdentifiers, setIdentifiers, toString, typeId |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private java.lang.String oid
private OidRecord oidRecord
private SnmpVariable snmpVar
Constructor Detail |
SnmpOid()
public SnmpOid(SnmpVariable snmpVar)
snmpVar
- The SnmpVariable object.public SnmpOid(SnmpOid snmpOid)
public SnmpOid(java.lang.String oid)
oid
- The oid string.Method Detail |
public java.lang.String getOid()
public OidRecord getOidRecord() throws SnmpException
SnmpException
- Thrown when any error occurs during retriving
the OID reocrd from the MIB database.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
- The encode bufferoffset
- The offset byte to begin decodingencoder
- The decoder object.
org.opennms.protocols.snmp.asn1.AsnDecodingException
- Thrown by the encoder if an error
occurs trying to decode the data buffer.
org.opennms.protocols.snmp.SnmpPduEncodingException
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
- The buffer to write the encoded information.offset
- The offset to start writing informationencoder
- The encoder object.
org.opennms.protocols.snmp.asn1.AsnEncodingException
- Thrown if the encoder finds an error in the
buffer.
org.opennms.protocols.snmp.SnmpPduEncodingException
|
MySnmpCrawler API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |