|
SNMP Stack 4_12 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Observable | +--uk.co.westhawk.snmp.stack.Pdu | +--uk.co.westhawk.snmp.stack.InformPdu | +--uk.co.westhawk.snmp.pdu.OneInformPdu
The OneInformPdu class will inform a manager about one (1) object (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 send to port 162 (the default trap port) by default. You will have to create a SnmpContext with the DefaultTrapContext.DEFAULT_TRAP_PORT as parameter!
Note: The stack so far only supports sending an Inform. Receiving an Inform and replying with a Response is NOT yet supported!
InformPdu_vec
,
varbind
,
DefaultTrapContext.DEFAULT_TRAP_PORT
Fields inherited from class uk.co.westhawk.snmp.stack.Pdu |
added, answered, context, encodedPacket, errind, errstat, msg_type, reqVarbinds, respVarbinds |
Constructor Summary | |
OneInformPdu(SnmpContextBasisFace con)
Constructor. |
|
OneInformPdu(SnmpContextBasisFace con,
java.lang.String oid)
Constructor that will send the request immediately. |
|
OneInformPdu(SnmpContextBasisFace con,
java.lang.String oid,
java.util.Observer o)
Constructor that will send the request immediately. |
Method Summary | |
protected void |
new_value(int n,
varbind a_var)
The value of the request is set. |
protected void |
tell_them()
The methods notifies all observers. |
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, send, send, send, sendme, setErrorIndex, setErrorStatus, setErrorStatus, setMsgType, setRetryIntervals, toString, 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 OneInformPdu(SnmpContextBasisFace con)
con
- The context of the requestpublic OneInformPdu(SnmpContextBasisFace con, java.lang.String oid) throws PduException, java.io.IOException
con
- the SnmpContextBasisFaceoid
- the oidpublic 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 receivedMethod Detail |
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.
tell_them
in class Pdu
|
SNMP Stack 4_12 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |