uk.co.westhawk.snmp.pdu
Class OneSetPdu
java.lang.Object
|
+--java.util.Observable
|
+--uk.co.westhawk.snmp.stack.Pdu
|
+--uk.co.westhawk.snmp.stack.SetPdu
|
+--uk.co.westhawk.snmp.pdu.OneSetPdu
- public class OneSetPdu
- extends SetPdu
The OneSetPdu class will set the value of one (1) object (oid), based
on the Set request.
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.
- Version:
- $Revision: 3.11 $ $Date: 2002/10/10 15:26:15 $
- Author:
- Birgit Arkesteijn
- See Also:
varbind
,
SetPdu_vec
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 |
OneSetPdu
public OneSetPdu(SnmpContextBasisFace con)
- Constructor.
- Parameters:
con
- The context of the request
OneSetPdu
public OneSetPdu(SnmpContextBasisFace con,
java.lang.String oid,
AsnObject val)
throws PduException,
java.io.IOException
- Constructor that will send the request immediately. No Observer
is set.
- Parameters:
con
- the SnmpContextBasisFaceoid
- the oidval
- The value
OneSetPdu
public OneSetPdu(SnmpContextBasisFace con,
java.lang.String oid,
AsnObject val,
java.util.Observer o)
throws PduException,
java.io.IOException
- Constructor that will send the request immediately.
- Parameters:
con
- the SnmpContextBasisFaceoid
- the oidval
- The valueo
- the Observer that will be notified when the answer is received
new_value
protected void new_value(int n,
varbind a_var)
- The value of the request is set. This will be called by
Pdu.fillin(). This is the value of the OID after the Set request
was done. If the SNMP server allowed the set, this will be the
same value as was set in SetPdu.addOid().
- Overrides:
new_value
in class Pdu
- Parameters:
n
- the index of the valuea_var
- the value- See Also:
Pdu.new_value(int, uk.co.westhawk.snmp.stack.varbind)
,
Pdu.addOid(String, AsnObject)
tell_them
protected void tell_them()
- The methods notifies all observers.
This will be called by Pdu.fillin().
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.
- Overrides:
tell_them
in class Pdu