| 
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.pdu.InterfacePdu
The InterfacePdu class asks one interface for information, useful for admin purposes. See RFC 2863.
InterfacesPdu| Field Summary | |
static java.lang.String | 
DOWN
The current operational state is down  | 
static java.lang.String | 
TESTING
The current operational state is testing  | 
static java.lang.String | 
UNKNOWN
The current operational state is unknown  | 
static java.lang.String | 
UP
The current operational state is up  | 
| Fields inherited from class uk.co.westhawk.snmp.stack.Pdu | 
added, answered, context, encodedPacket, errind, errstat, msg_type, reqVarbinds, respVarbinds | 
| Constructor Summary | |
InterfacePdu(SnmpContextBasisFace con,
             java.util.Observer o,
             int interf)
Constructor that will send the request immediately.  | 
|
| Method Summary | |
 java.lang.String | 
getDescription()
Returns the description of the interface.  | 
 int | 
getIndex()
Returns the index of the interface.  | 
 long | 
getInOctet()
Returns the total number of octets received on the interface, including framing characters.  | 
static int | 
getNumIfs(SnmpContextBasisFace con)
Returns how many interfaces are present.  | 
 int | 
getOperStatus()
Returns the operational state of the interface.  | 
 java.lang.String | 
getOperStatusString()
Returns the string representation of the operational state of the interface.  | 
 java.lang.String | 
getOperStatusString(int status)
Returns the string representation of a operational state.  | 
 long | 
getOutOctet()
Returns the total number of octets transmitted outOctets of the interface, including framing characters.  | 
 long | 
getSpeed(InterfacePdu old)
Calculates the speed of the interface.  | 
 long | 
getSysUpTime()
Returns the time (in hundredths of a second) since the network management portion of the system was last re-initialized.  | 
protected  void | 
new_value(int n,
          varbind res)
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 | 
| Field Detail | 
public static final java.lang.String UP
public static final java.lang.String DOWN
public static final java.lang.String TESTING
public static final java.lang.String UNKNOWN
| Constructor Detail | 
public InterfacePdu(SnmpContextBasisFace con,
                    java.util.Observer o,
                    int interf)
             throws PduException,
                    java.io.IOException
con - the SnmpContextBasisFaceo - the Observer that will be notified when the answer is receivedinterf - the index of the requested interface| Method Detail | 
public int getIndex()
public long getSysUpTime()
public java.lang.String getDescription()
public int getOperStatus()
public java.lang.String getOperStatusString()
getOperStatus(), 
getOperStatusString(int)public java.lang.String getOperStatusString(int status)
getOperStatusString()public long getInOctet()
public long getOutOctet()
public long getSpeed(InterfacePdu old)
old - The previous value of this interface
protected void new_value(int n,
                         varbind res)
new_value in class Pdun - 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
public static int getNumIfs(SnmpContextBasisFace con)
                     throws PduException,
                            java.io.IOException
  | 
SNMP Stack 4_12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||