SNMP Stack 5_1

uk.co.westhawk.snmp.pdu
Class InterfaceGetNextPduStub

java.lang.Object
  |
  +--java.util.Observable
        |
        +--uk.co.westhawk.snmp.stack.Pdu
              |
              +--uk.co.westhawk.snmp.stack.GetNextPdu
                    |
                    +--uk.co.westhawk.snmp.pdu.InterfaceGetNextPduStub
Direct Known Subclasses:
InterfaceGetNextPdu

public class InterfaceGetNextPduStub
extends GetNextPdu

The class InterfaceGetNextPduStub. This file is auto generated by the StubBrowser utility, using Mibble. See the uk/co/westhawk/stub/ directory. Make sure that you replace the package name and classname placeholders. Also, move this file to the correct package directory. If these things are not done, this class will not compile correctly!!

Since:
4_14
Version:
$Revision: 3.3 $ $Date: 2006/01/17 17:59:33 $

Field Summary
protected  java.lang.String _ifDescr
           
protected  int _ifIndex
           
protected  long _ifInOctets
           
protected  int _ifNumber
           
protected  int _ifOperStatus
           
protected  java.util.HashMap _ifOperStatusMap
           
protected  long _ifOutOctets
           
protected  long _ifSpeed
           
protected  long _sysUpTime
           
protected  boolean _valid
           
static java.lang.String[] all_oids
           
static java.lang.String[] col_oids
           
static java.lang.String ifDescr_OID
           
static java.lang.String ifIndex_OID
           
static java.lang.String ifInOctets_OID
           
static java.lang.String ifNumber_OID
           
static java.lang.String ifOperStatus_OID
           
static java.lang.String ifOutOctets_OID
           
static java.lang.String ifSpeed_OID
           
static int NO_COL
           
static int NO_OID
           
static int NO_SCAL
           
static java.lang.String[] scal_oids
           
static java.lang.String sysUpTime_OID
           
 
Fields inherited from class uk.co.westhawk.snmp.stack.Pdu
added, answered, context, encodedPacket, errind, errstat, msg_type, reqVarbinds, respVarbinds, snmpv3MsgId
 
Constructor Summary
InterfaceGetNextPduStub(SnmpContextBasisFace con)
          Constructor.
InterfaceGetNextPduStub(SnmpContextBasisFace con, java.util.Observer o)
          Constructor that will send the first request immediately.
 
Method Summary
 void addOids(int index)
          This method sets the column index.
 void addOids(InterfaceGetNextPduStub old)
          The method addOids is the basis for the GetNext functionality.
 java.lang.String getIfDescr()
           
 int getIfIndex()
           
 long getIfInOctets()
           
 int getIfNumber()
           
 int getIfOperStatus()
           
 java.lang.String getIfOperStatusStr()
           
 long getIfOutOctets()
           
 long getIfSpeed()
           
 long getSysUpTime()
           
 boolean isValid()
          Returns if this set of values is valid.
protected  void new_value(int n, varbind res)
          The value of the request is set.
 void setIfDescr(AsnObject new_value)
          ifDescr OBJECT-TYPE ( Syntax: [UNIVERSAL 4] OCTET STRING (SIZE (0..255)) Access: read-only Status: mandatory Description: A textual string containing information about the interface.
 void setIfIndex(AsnObject new_value)
          ifIndex OBJECT-TYPE ( Syntax: [UNIVERSAL 2] INTEGER Access: read-only Status: mandatory Description: A unique value for each interface.
 void setIfInOctets(AsnObject new_value)
          ifInOctets OBJECT-TYPE ( Syntax: [APPLICATION 1] INTEGER (0..4294967295) Access: read-only Status: mandatory Description: The total number of octets received on the interface, including framing characters. )
 void setIfNumber(AsnObject new_value)
          ifNumber OBJECT-TYPE ( Syntax: [UNIVERSAL 2] INTEGER Access: read-only Status: mandatory Description: The number of network interfaces (regardless of their current state) present on this system. )
 void setIfOperStatus(AsnObject new_value)
          ifOperStatus OBJECT-TYPE ( Syntax: [UNIVERSAL 2] INTEGER (1 | 2 | 3) Access: read-only Status: mandatory Description: The current operational state of the interface.
 void setIfOutOctets(AsnObject new_value)
          ifOutOctets OBJECT-TYPE ( Syntax: [APPLICATION 1] INTEGER (0..4294967295) Access: read-only Status: mandatory Description: The total number of octets transmitted out of the interface, including framing characters. )
 void setIfSpeed(AsnObject new_value)
          ifSpeed OBJECT-TYPE ( Syntax: [APPLICATION 2] INTEGER (0..4294967295) Access: read-only Status: mandatory Description: An estimate of the interface's current bandwidth in bits per second.
 void setSysUpTime(AsnObject new_value)
          sysUpTime OBJECT-TYPE ( Syntax: [APPLICATION 3] INTEGER (0..4294967295) Access: read-only Status: mandatory Description: The time (in hundredths of a second) since the network management portion of the system was last re-initialized. )
 java.lang.String toString()
          Returns the string representation of the PDU.
 
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, tell_them, 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

sysUpTime_OID

public static final java.lang.String sysUpTime_OID
See Also:
Constant Field Values

ifNumber_OID

public static final java.lang.String ifNumber_OID
See Also:
Constant Field Values

ifIndex_OID

public static final java.lang.String ifIndex_OID
See Also:
Constant Field Values

ifDescr_OID

public static final java.lang.String ifDescr_OID
See Also:
Constant Field Values

ifSpeed_OID

public static final java.lang.String ifSpeed_OID
See Also:
Constant Field Values

ifOperStatus_OID

public static final java.lang.String ifOperStatus_OID
See Also:
Constant Field Values

ifInOctets_OID

public static final java.lang.String ifInOctets_OID
See Also:
Constant Field Values

ifOutOctets_OID

public static final java.lang.String ifOutOctets_OID
See Also:
Constant Field Values

NO_SCAL

public static final int NO_SCAL
See Also:
Constant Field Values

NO_COL

public static final int NO_COL
See Also:
Constant Field Values

NO_OID

public static final int NO_OID
See Also:
Constant Field Values

scal_oids

public static final java.lang.String[] scal_oids

col_oids

public static final java.lang.String[] col_oids

all_oids

public static final java.lang.String[] all_oids

_sysUpTime

protected long _sysUpTime

_ifNumber

protected int _ifNumber

_ifIndex

protected int _ifIndex

_ifDescr

protected java.lang.String _ifDescr

_ifSpeed

protected long _ifSpeed

_ifOperStatusMap

protected java.util.HashMap _ifOperStatusMap

_ifOperStatus

protected int _ifOperStatus

_ifInOctets

protected long _ifInOctets

_ifOutOctets

protected long _ifOutOctets

_valid

protected boolean _valid
Constructor Detail

InterfaceGetNextPduStub

public InterfaceGetNextPduStub(SnmpContextBasisFace con)
Constructor.

Parameters:
con - The context of the request

InterfaceGetNextPduStub

public InterfaceGetNextPduStub(SnmpContextBasisFace con,
                               java.util.Observer o)
                        throws PduException,
                               java.io.IOException
Constructor that will send the first request immediately.

Parameters:
con - The context of the request
o - the Observer that will be notified when the answer is received
Method Detail

addOids

public void addOids(InterfaceGetNextPduStub old)
The method addOids is the basis for the GetNext functionality. If old is null, it initialises the varbinds from all_oids. If old is not null, it copies the column OIDs from the old InterfaceGetNextPduStub object. so the request continues where the previous one left. Note, the scalars and the columns OIDs are handled differently. The scalars are always copied from the original scal_oids, only the column OIDs are copied from the old InterfaceGetNextPduStub object.


addOids

public void addOids(int index)
This method sets the column index. By doing this, the request will return (only) this index. The index parameters only applies to the column OIDs. The scalars are copied from the original scal_oids.


new_value

protected void new_value(int n,
                         varbind res)
The value of the request is set. This will be called by Pdu.fillin(). I check if the variables are still in range. I do this because I'm only interessed in a part of the MIB. If I would not do this check, I'll get the whole MIB from the starting point, instead of the variables in the table.

Overrides:
new_value in class Pdu
Parameters:
n - the index of the value
See Also:
Pdu.new_value(int, uk.co.westhawk.snmp.stack.varbind)

setSysUpTime

public void setSysUpTime(AsnObject new_value)
sysUpTime OBJECT-TYPE ( Syntax: [APPLICATION 3] INTEGER (0..4294967295) Access: read-only Status: mandatory Description: The time (in hundredths of a second) since the network management portion of the system was last re-initialized. )


getSysUpTime

public long getSysUpTime()

setIfNumber

public void setIfNumber(AsnObject new_value)
ifNumber OBJECT-TYPE ( Syntax: [UNIVERSAL 2] INTEGER Access: read-only Status: mandatory Description: The number of network interfaces (regardless of their current state) present on this system. )


getIfNumber

public int getIfNumber()

setIfIndex

public void setIfIndex(AsnObject new_value)
ifIndex OBJECT-TYPE ( Syntax: [UNIVERSAL 2] INTEGER Access: read-only Status: mandatory Description: A unique value for each interface. Its value ranges between 1 and the value of ifNumber. The value for each interface must remain constant at least from one re-initialization of the entity's network management system to the next re- initialization. )


getIfIndex

public int getIfIndex()

setIfDescr

public void setIfDescr(AsnObject new_value)
ifDescr OBJECT-TYPE ( Syntax: [UNIVERSAL 4] OCTET STRING (SIZE (0..255)) Access: read-only Status: mandatory Description: A textual string containing information about the interface. This string should include the name of the manufacturer, the product name and the version of the hardware interface. )


getIfDescr

public java.lang.String getIfDescr()

setIfSpeed

public void setIfSpeed(AsnObject new_value)
ifSpeed OBJECT-TYPE ( Syntax: [APPLICATION 2] INTEGER (0..4294967295) Access: read-only Status: mandatory Description: An estimate of the interface's current bandwidth in bits per second. For interfaces which do not vary in bandwidth or for those where no accurate estimation can be made, this object should contain the nominal bandwidth. )


getIfSpeed

public long getIfSpeed()

setIfOperStatus

public void setIfOperStatus(AsnObject new_value)
ifOperStatus OBJECT-TYPE ( Syntax: [UNIVERSAL 2] INTEGER (1 | 2 | 3) Access: read-only Status: mandatory Description: The current operational state of the interface. The testing(3) state indicates that no operational packets can be passed. )


getIfOperStatusStr

public java.lang.String getIfOperStatusStr()

getIfOperStatus

public int getIfOperStatus()

setIfInOctets

public void setIfInOctets(AsnObject new_value)
ifInOctets OBJECT-TYPE ( Syntax: [APPLICATION 1] INTEGER (0..4294967295) Access: read-only Status: mandatory Description: The total number of octets received on the interface, including framing characters. )


getIfInOctets

public long getIfInOctets()

setIfOutOctets

public void setIfOutOctets(AsnObject new_value)
ifOutOctets OBJECT-TYPE ( Syntax: [APPLICATION 1] INTEGER (0..4294967295) Access: read-only Status: mandatory Description: The total number of octets transmitted out of the interface, including framing characters. )


getIfOutOctets

public long getIfOutOctets()

isValid

public boolean isValid()
Returns if this set of values is valid.


toString

public java.lang.String toString()
Description copied from class: Pdu
Returns the string representation of the PDU.

Overrides:
toString in class Pdu
Returns:
The string of the PDU

SNMP Stack 5_1