|
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.GetPdu | +--uk.co.westhawk.snmp.pdu.UpSincePdu
The UpSincePdu class will send a Get request for the sysUpTime and will calculate that date the system rebooted the last time.
Field Summary | |
static java.lang.String |
SYSUPTIME
The oid of sysUpTime |
Fields inherited from class uk.co.westhawk.snmp.stack.Pdu |
added, answered, context, encodedPacket, errind, errstat, msg_type, reqVarbinds, respVarbinds, snmpv3MsgId |
Constructor Summary | |
UpSincePdu(SnmpContextBasisFace con,
java.util.Observer o)
Constructor that will send the request immediately. |
Method Summary | |
java.util.Date |
getDate()
Returns the date when the system went up, (sysUpTime). |
protected void |
new_value(int n,
varbind res)
The value of the request is set. |
protected void |
tell_them()
This method 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, isExpectingResponse, isTimedOut, notifyObservers, printVars, 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 |
Field Detail |
public static final java.lang.String SYSUPTIME
Constructor Detail |
public UpSincePdu(SnmpContextBasisFace con, java.util.Observer o) throws PduException, java.io.IOException
con
- The context of the requesto
- the Observer that will be notified when the answer is receivedMethod Detail |
public java.util.Date getDate()
protected void new_value(int n, varbind res)
new_value
in class Pdu
n
- the index of 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 Date. In the case of an exception, that exception will be passed.
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 |