|
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.MultiResponsePdu
This class can receive multiple responses. Typical usage includes sending a single PDU to a multicast / broadcast address so that multiple responses can be received from different sources.
This class sets a single long timeout for the retry, so it sends the request only once. Opposite to its parent class, this class does not ignore the duplicate responses, and it will timeout by nature.
Thanks to Josh Bers <jbers@bbn.com>
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 | |
MultiResponsePdu(SnmpContextBasisFace con)
By default create a MultiResponsePdu that will wait for 3 seconds for responses to come in from multiple sources. |
Method Summary | |
int |
getNumResponses()
Gets the number of responses so far received to this request. |
java.lang.String |
getSourceAgent()
Gets the IP address of the host of the most recent response received. |
protected void |
tell_them()
Lets the observers know which source we received a response from. |
java.lang.String |
toString()
Prints out the list of received responses and their source IP addressses. |
Methods inherited from class uk.co.westhawk.snmp.stack.Pdu |
addOid, addOid, addOid, addOid, addOid, addToTrans, getContext, getErrorIndex, getErrorStatus, getErrorStatusString, getMsgType, getReqId, getRequestVarbinds, getResponseVarbinds, isExpectingResponse, isTimedOut, new_value, 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 MultiResponsePdu(SnmpContextBasisFace con)
con
- The contextMethod Detail |
public java.lang.String getSourceAgent()
public int getNumResponses()
public java.lang.String toString()
toString
in class Pdu
protected void tell_them()
tell_them
in class Pdu
|
SNMP Stack 5_1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |