public class ResponsePdu extends Pdu
This class is not used when request are sent out by the stack and a response is received. In that case the OIDs of the response are integrated into the original request PDU.
For SNMPv3: The sender of a response PDU acts as the authoritative engine.
ListeningContext
,
RequestPduEvent
,
DecodedPduEvent.getHostPort()
added, answered, context, encodedPacket, errind, errstat, msg_type, reqVarbinds, respVarbinds, snmpv3MsgId
Constructor and Description |
---|
ResponsePdu(SnmpContextBasisFace con,
Pdu requestPdu)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
isExpectingResponse()
Returns that this type of PDU is not expecting a response.
|
protected void |
new_value(int n,
varbind res)
Has no meaning, since there is not response.
|
void |
setErrorIndex(int errorIndex)
Sets the error index of this PDU.
|
void |
setErrorStatus(int errorStatus)
Sets the error status of this PDU.
|
protected void |
tell_them()
Has no meaning, since there is not response.
|
java.lang.String |
toString()
Returns the string representation of this object.
|
addOid, addOid, addOid, addOid, addOid, addToTrans, getContext, getErrorIndex, getErrorStatus, getErrorStatusString, getMsgType, getReqId, getRequestVarbinds, getResponseVarbinds, getRetryIntervals, isTimedOut, notifyObservers, printVars, send, send, send, sendme, setErrorStatus, setMsgType, setRetryIntervals, toString, waitForSelf
public ResponsePdu(SnmpContextBasisFace con, Pdu requestPdu)
con
- The context of the PDUrequestPdu
- The original Request PDUpublic void setErrorStatus(int errorStatus)
setErrorStatus
in class Pdu
errorStatus
- the error statusSnmpConstants.SNMP_ERR_NOERROR
,
SnmpConstants.SNMP_ERR_TOOBIG
,
SnmpConstants.SNMP_ERR_NOSUCHNAME
,
SnmpConstants.SNMP_ERR_BADVALUE
,
SnmpConstants.SNMP_ERR_READONLY
,
SnmpConstants.SNMP_ERR_GENERR
,
SnmpConstants.SNMP_ERR_NOACCESS
,
SnmpConstants.SNMP_ERR_WRONGTYPE
,
SnmpConstants.SNMP_ERR_WRONGLENGTH
,
SnmpConstants.SNMP_ERR_WRONGENCODING
,
SnmpConstants.SNMP_ERR_WRONGVALUE
,
SnmpConstants.SNMP_ERR_NOCREATION
,
SnmpConstants.SNMP_ERR_INCONSISTENTVALUE
,
SnmpConstants.SNMP_ERR_RESOURCEUNAVAILABLE
,
SnmpConstants.SNMP_ERR_COMMITFAILED
,
SnmpConstants.SNMP_ERR_UNDOFAILED
,
SnmpConstants.SNMP_ERR_AUTHORIZATIONERR
,
SnmpConstants.SNMP_ERR_NOTWRITABLE
,
SnmpConstants.SNMP_ERR_INCONSISTENTNAME
public void setErrorIndex(int errorIndex)
setErrorIndex
in class Pdu
errorIndex
- the error indexPdu.setErrorStatus(int)
,
Pdu.getErrorIndex()
public java.lang.String toString()
protected void new_value(int n, varbind res)
protected void tell_them()
protected boolean isExpectingResponse()
isExpectingResponse
in class Pdu