public class InformPdu_vec extends InformPdu
The InformPdu_vec class will inform a manager about a number of objects (OIDs), based on the Inform request.
Specify with addOid()
the OIDs that should be informed with this
InformPdu request. No more than count
(see constructor)
should be added.
Add an Observer to the InformPdu with addObserver()
, and
send the InformPdu with send()
.
Note, this PDU should be sent to port 162 (the default trap port) by default. You will have to create a SnmpContext with the ListeningContextFace.DEFAULT_TRAP_PORT as parameter!
Inform Requests are sent between managers. It is a kind of 'acknowlegded' trap since the receiving end should send a Response Pdu as reply. The varbind list has the same elements as the TrapPduv2.
Pdu.addOid(java.lang.String)
,
Pdu.send()
,
varbind
,
ListeningContextFace.DEFAULT_TRAP_PORT
added, answered, context, encodedPacket, errind, errstat, msg_type, reqVarbinds, respVarbinds, snmpv3MsgId
Constructor and Description |
---|
InformPdu_vec(SnmpContextBasisFace con,
int count)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
new_value(int n,
varbind var)
The value of the request is set.
|
protected void |
tell_them()
This method notifies all observers.
|
addOid, addOid, addOid, addOid, addOid, addToTrans, getContext, getErrorIndex, getErrorStatus, getErrorStatusString, getMsgType, getReqId, getRequestVarbinds, getResponseVarbinds, getRetryIntervals, isExpectingResponse, isTimedOut, notifyObservers, printVars, send, send, send, sendme, setErrorIndex, setErrorStatus, setErrorStatus, setMsgType, setRetryIntervals, toString, toString, waitForSelf
public InformPdu_vec(SnmpContextBasisFace con, int count)
con
- The context of the requestcount
- The number of OIDs to be getprotected void new_value(int n, varbind var)
new_value
in class Pdu
n
- the index of the valuevar
- the valuePdu.new_value(int, uk.co.westhawk.snmp.stack.varbind)
protected void tell_them()
If no exception occurred whilst receiving the response, the Object to the update() method of the Observer will be an array of varbinds, so they may contains any AsnObject type. If an exception occurred, that exception will be passed as the Object to the update() method.