|
SNMP Stack 5_1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.util.Observable
|
+--uk.co.westhawk.snmp.stack.Pdu
|
+--uk.co.westhawk.snmp.stack.ResponsePdu
This class represents the ASN SNMP Response PDU object. This class should be used when responding to an incoming request via a ListeningContext. Note that you should use the port of the RequestPduEvent (getHostPort()) when creating a SnmpContext.
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()| Field Summary |
| Fields inherited from class uk.co.westhawk.snmp.stack.Pdu |
added, answered, context, encodedPacket, errind, errstat, msg_type, reqVarbinds, respVarbinds, snmpv3MsgId |
| Constructor Summary | |
ResponsePdu(SnmpContextBasisFace con,
Pdu requestPdu)
Constructor. |
|
| Method Summary | |
void |
getErrorIndex(int errorIndex)
Sets the error index of this PDU. |
void |
getErrorStatus(int errorStatus)
Sets the error status of this PDU. |
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. |
protected void |
tell_them()
Has no meaning, since there is not response. |
java.lang.String |
toString()
Returns the string representation of this object. |
| Methods inherited from class uk.co.westhawk.snmp.stack.Pdu |
addOid, addOid, addOid, addOid, addOid, addToTrans, getContext, getErrorIndex, getErrorStatus, getErrorStatusString, getMsgType, getReqId, getRequestVarbinds, getResponseVarbinds, isTimedOut, notifyObservers, printVars, send, send, send, sendme, setErrorIndex, setErrorStatus, setErrorStatus, setMsgType, setRetryIntervals, toString, waitForSelf |
| Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ResponsePdu(SnmpContextBasisFace con,
Pdu requestPdu)
con - The context of the PDUrequestPdu - The original Request PDU| Method Detail |
public void getErrorStatus(int errorStatus)
SnmpConstants.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_INCONSISTENTNAMEpublic void getErrorIndex(int errorIndex)
public java.lang.String toString()
toString in class Pdu
protected void new_value(int n,
varbind res)
new_value in class Pduprotected void tell_them()
tell_them in class Pduprotected boolean isExpectingResponse()
isExpectingResponse in class Pdu
|
SNMP Stack 5_1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||