public class SnmpPduRequest extends 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 and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
addVarBind, addVarBindAt, decodeASN, encodeASN, getCommand, getLength, getPeer, getRequestId, getVarBindAt, nextSequence, removeVarBindAt, setCommand, setPeer, setRequestId, setVarBindAt, toVarBindArray, typeIdpublic 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.REPORTpublic 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.REPORTpublic int getErrorStatus()
SnmpPduPacketpublic 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 SnmpSyntaxduplicate in class SnmpPduPacketpublic Object clone()
clone in class SnmpPduPacketCopyright © 2022. All rights reserved.