InformPdu
public class OneInformPdu extends InformPdu
The OneInformPdu class will inform a manager about one object (OIDs), based on the Inform request.
This class represents the SNMP Inform Request PDU. 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.
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!
For SNMPv3: The receiver of an inform PDU acts as the authoritative engine.
InformPdu_vec
,
varbind
,
ListeningContextFace.DEFAULT_TRAP_PORT
added, answered, context, encodedPacket, errind, errstat, msg_type, reqVarbinds, respVarbinds, snmpv3MsgId
Constructor and Description |
---|
OneInformPdu(SnmpContextBasisFace con)
Deprecated.
Constructor.
|
OneInformPdu(SnmpContextBasisFace con,
java.lang.String oid)
Deprecated.
Constructor that will send the request immediately.
|
OneInformPdu(SnmpContextBasisFace con,
java.lang.String oid,
java.util.Observer o)
Deprecated.
Constructor that will send the request immediately.
|
Modifier and Type | Method and Description |
---|---|
protected void |
new_value(int n,
varbind a_var)
Deprecated.
The value of the request is set.
|
protected void |
tell_them()
Deprecated.
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 OneInformPdu(SnmpContextBasisFace con)
con
- The context (v2c or v3) of the PDUpublic OneInformPdu(SnmpContextBasisFace con, java.lang.String oid) throws PduException, java.io.IOException
con
- the SnmpContextBasisFaceoid
- the oidPduException
java.io.IOException
public OneInformPdu(SnmpContextBasisFace con, java.lang.String oid, java.util.Observer o) throws PduException, java.io.IOException
con
- the SnmpContextBasisFaceoid
- the oido
- the Observer that will be notified when the answer is receivedPduException
java.io.IOException
protected void new_value(int n, varbind a_var)
new_value
in class Pdu
n
- the index of the valuea_var
- the valuePdu.new_value(int, uk.co.westhawk.snmp.stack.varbind)
protected void tell_them()
Unless an exception occurred the Object to the update() method of the Observer will be a varbind, so any AsnObject type can be returned. In the case of an exception, that exception will be passed.