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, typeId
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
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 Object clone()
clone
in class SnmpPduPacket
Copyright © 2021. All rights reserved.