|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.protocols.snmp.SnmpPduPacket
org.opennms.protocols.snmp.SnmpPduRequest
The SnmpPduRequest defines the SNMPv1 and SNMPv2 Protocol Data Unit (PDU) for certian message types. The types include: GetRequest, GetNextRequest, SetRequest, SNMPv2-Trap, InformRequest, and Response. By default the class is constructed as a SNMP GetRequest, but can be defined to any of the accepted types. For more information see [Stallings99] page 368.
Field Summary |
Fields inherited from class org.opennms.protocols.snmp.SnmpPduPacket |
ErrAuthorizationError, ErrBadValue, ErrCommitFailed, ErrGenError, ErrInconsistentName, ErrInconsistentValue, ErrNoAccess, ErrNoCreation, ErrNoError, ErrNoSuchName, ErrNotWritable, ErrReadOnly, ErrResourceUnavailable, ErrTooBig, ErrUndoFailed, ErrWrongEncoding, ErrWrongLength, ErrWrongType, ErrWrongValue, GET, GETBULK, GETNEXT, INFORM, m_errIndex, m_errStatus, REPORT, RESPONSE, SET, V2TRAP |
Constructor Summary | |
SnmpPduRequest()
Default class constructor. |
|
SnmpPduRequest(int command)
Constructs a new PDU Request with the specified command. |
|
SnmpPduRequest(int command,
SnmpVarBind[] vars)
Constructs the PDU with the specified command and the passed variables. |
|
SnmpPduRequest(SnmpPduRequest second)
Class copy constructor. |
Method Summary | |
java.lang.Object |
clone()
Used to get a duplicate of self. |
SnmpSyntax |
duplicate()
Used to get a duplicate of self. |
void |
fix()
Fixes a PDU in error. |
int |
getErrorIndex()
Returns the index of the variable in error if the error status is non-zero. |
int |
getErrorStatus()
Returns the error status for the request. |
void |
setErrorIndex(int ndx)
Sets the current error index in the PDU. |
void |
setErrorStatus(int status)
Used to set the value of the error status member. |
Methods inherited from class org.opennms.protocols.snmp.SnmpPduPacket |
addVarBind, addVarBindAt, decodeASN, encodeASN, getCommand, getLength, getPeer, getRequestId, getVarBindAt, nextSequence, removeVarBindAt, setCommand, setPeer, setRequestId, setVarBindAt, toVarBindArray, typeId |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SnmpPduRequest()
public SnmpPduRequest(SnmpPduRequest second)
second
- The object to make a duplicate of.public SnmpPduRequest(int command)
command
- The type of PDU to constructSnmpPduPacket.GET
,
SnmpPduPacket.GETNEXT
,
SnmpPduPacket.SET
,
SnmpPduPacket.RESPONSE
,
SnmpPduPacket.INFORM
,
SnmpPduPacket.V2TRAP
,
SnmpPduPacket.REPORT
public SnmpPduRequest(int command, SnmpVarBind[] vars)
command
- The type of PDU to constructvars
- The SNMP variables for the PDU.SnmpPduPacket.GET
,
SnmpPduPacket.GETNEXT
,
SnmpPduPacket.SET
,
SnmpPduPacket.RESPONSE
,
SnmpPduPacket.INFORM
,
SnmpPduPacket.V2TRAP
,
SnmpPduPacket.REPORT
Method Detail |
public int getErrorStatus()
SnmpPduPacket
public void setErrorStatus(int status)
status
- The new error status for the pdu.public int getErrorIndex()
public void setErrorIndex(int ndx)
ndx
- The new error index.public void fix()
public SnmpSyntax duplicate()
duplicate
in interface SnmpSyntax
duplicate
in class SnmpPduPacket
public java.lang.Object clone()
clone
in class SnmpPduPacket
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |