|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap
java.util.TreeMap
org.opennms.netmgt.capsd.snmp.IfXTableEntry
This object contains a list of all the elements defined in the MIB-II interface extensions table. An instance object is initialized by calling the constructor and passing in a variable list from an SNMP PDU. The actual data can be recovered via the base class map interface.
Once an instance is created and its data set either via the constructor or from the update method, the actual elements can be retreived using the instance names. The names include: ifName,ifInMulticastPts ,ifInBroadcastPkts,etc al. The information can also be accessed by using the complete object identifer for the entry.
For more information on the individual fields, and to find out their respective object identifiers see RFC1573 from the IETF.
Nested Class Summary |
Nested classes inherited from class java.util.TreeMap |
|
Nested classes inherited from class java.util.AbstractMap |
|
Field Summary | |
static java.lang.String |
IF_ALIAS
|
static java.lang.String |
IF_CONNECTOR_PRESENT
|
static java.lang.String |
IF_COUNTER_DISCONTINUITY_TIME
|
static java.lang.String |
IF_HC_IN_BCAST_PKTS
|
static java.lang.String |
IF_HC_IN_MCAST_PKTS
|
static java.lang.String |
IF_HC_IN_OCTETS
|
static java.lang.String |
IF_HC_IN_UCAST_PKTS
|
static java.lang.String |
IF_HC_OUT_BCAST_PKTS
|
static java.lang.String |
IF_HC_OUT_MCAST_PKTS
|
static java.lang.String |
IF_HC_OUT_OCTETS
|
static java.lang.String |
IF_HC_OUT_UCAST_PKTS
|
static java.lang.String |
IF_HIGH_SPEED
|
static java.lang.String |
IF_IN_BCAST_PKTS
|
static java.lang.String |
IF_IN_MCAST_PKTS
|
static java.lang.String |
IF_INDEX
|
static java.lang.String |
IF_LINK_UP_DOWN_TRAP_ENABLE
|
static java.lang.String |
IF_NAME
Lookup strings for specific table entries |
static java.lang.String |
IF_OUT_BCAST_PKTS
|
static java.lang.String |
IF_OUT_MCAST_PKTS
|
static java.lang.String |
IF_PROMISCUOUS_MODE
|
private static NamedSnmpVar[] |
ms_elemList
The keys that will be supported by default from the TreeMap base class. |
(package private) static int |
NUM_OIDS
Number of object identfiers making up the interface extensions table WARNING: This value must be incremented by one for each new object added to the ms_elemList variable |
static SnmpObjectId |
ROOT
The SnmpObjectId that represents the root of the interface tree. |
static java.lang.String |
TABLE_OID
The TABLE_OID is the object identifier that represents the root of the interface extensions table in the MIB forest. |
Fields inherited from class java.util.TreeMap |
|
Fields inherited from class java.util.AbstractMap |
|
Constructor Summary | |
IfXTableEntry()
Creates a default instance of the interface table entry map. |
|
IfXTableEntry(SnmpVarBind[] vars)
The class constructor used to initialize the object to its initial state. |
Method Summary | |
static SnmpPduPacket |
getBulkPdu(int numInterfaces)
This method is used to get a generic SNMPv2 GETBULK PDU that contains a single varbind -- the ifXTable root oid. |
static int |
getElementListSize()
Returns the number of entries in the MIB-II ifXTable element list. |
static SnmpPduRequest |
getIfNumberPdu()
This method will generate a packet that will go out and retrieve the ifNumber variable from the MIB, the variable that states the number of interfaces for the device. |
static SnmpPduPacket |
getNextPdu()
This method is used to get a generic SNMPv1 GETNEXT PDU that contains one varbind per member element. |
static SnmpObjectId |
stop_oid()
This method will determine where the cut off point will be for valid data from the response to the GETBULK packet. |
void |
update(SnmpVarBind[] vars)
This method is used to update the map with the current information from the agent. |
Methods inherited from class java.util.TreeMap |
clear, clone, comparator, containsKey, containsValue, entrySet, firstKey, get, headMap, keySet, lastKey, put, putAll, remove, size, subMap, tailMap, values |
Methods inherited from class java.util.AbstractMap |
equals, hashCode, isEmpty, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
equals, hashCode, isEmpty |
Field Detail |
public static final java.lang.String IF_NAME
public static final java.lang.String IF_IN_MCAST_PKTS
public static final java.lang.String IF_IN_BCAST_PKTS
public static final java.lang.String IF_OUT_MCAST_PKTS
public static final java.lang.String IF_OUT_BCAST_PKTS
public static final java.lang.String IF_HC_IN_OCTETS
public static final java.lang.String IF_HC_IN_UCAST_PKTS
public static final java.lang.String IF_HC_IN_MCAST_PKTS
public static final java.lang.String IF_HC_IN_BCAST_PKTS
public static final java.lang.String IF_HC_OUT_OCTETS
public static final java.lang.String IF_HC_OUT_UCAST_PKTS
public static final java.lang.String IF_HC_OUT_MCAST_PKTS
public static final java.lang.String IF_HC_OUT_BCAST_PKTS
public static final java.lang.String IF_LINK_UP_DOWN_TRAP_ENABLE
public static final java.lang.String IF_HIGH_SPEED
public static final java.lang.String IF_PROMISCUOUS_MODE
public static final java.lang.String IF_CONNECTOR_PRESENT
public static final java.lang.String IF_ALIAS
public static final java.lang.String IF_COUNTER_DISCONTINUITY_TIME
public static final java.lang.String IF_INDEX
private static NamedSnmpVar[] ms_elemList
The keys that will be supported by default from the TreeMap base class. Each of the elements in the list are an instance of the SNMP Interface table. Objects in this list should be used by multiple instances of this class.
static int NUM_OIDS
public static final java.lang.String TABLE_OID
The TABLE_OID is the object identifier that represents the root of the interface extensions table in the MIB forest.
public static final SnmpObjectId ROOT
The SnmpObjectId that represents the root of the interface tree. It is created when the class is initialized and contains the value of TABLE_OID.
TABLE_OID
Constructor Detail |
public IfXTableEntry()
Creates a default instance of the interface table entry map. The map represents a singular instance of the interface extensions table. Each column in the table for the loaded instance may be retreived either through its name or object identifier.
The initial table is constructied with zero elements in the map.
public IfXTableEntry(SnmpVarBind[] vars)
The class constructor used to initialize the object to its initial state. Although the object's attributes and data can be changed after its created, this constructor will initialize all the variables as per their named varbind in the passed array. This array should have been collected from an SnmpPduRequest that was received from a remote host.
vars
- The array of variable bindings.Method Detail |
public void update(SnmpVarBind[] vars)
This method is used to update the map with the current information from the agent. The array of variables should be all the elements in the interfaces row.
This does not clear out any column in the actual ifXEntry row that does not have a definition.
vars
- The variables in the interface row.public static SnmpPduPacket getNextPdu()
This method is used to get a generic SNMPv1 GETNEXT PDU that contains one varbind per member element. The PDU can then be used to perform an SNMP walk of the MIB-II interface table on remote host via consecutive SNMPv1 GETNEXT requests.
public static SnmpPduPacket getBulkPdu(int numInterfaces)
This method is used to get a generic SNMPv2 GETBULK PDU that contains a single varbind -- the ifXTable root oid. The PDU can then be used to perform an SNMP walk of the MIB-II interface extensions table on remote host via SNMPv2 GETBULK REQUESTS.
public static SnmpObjectId stop_oid()
This method will determine where the cut off point will be for valid data from the response to the GETBULK packet. By using the size of the element list, listed above, we can determine the proper index for this task.
public static SnmpPduRequest getIfNumberPdu()
This method will generate a packet that will go out and retrieve the ifNumber variable from the MIB, the variable that states the number of interfaces for the device.
public static int getElementListSize()
Returns the number of entries in the MIB-II ifXTable element list.
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |