org.opennms.netmgt.provision.service.snmp
Class NamedSnmpVar

java.lang.Object
  extended by org.opennms.netmgt.provision.service.snmp.NamedSnmpVar

public final class NamedSnmpVar
extends Object

The NamedSnmpVar class is used to associate a name for a particular snmp instance with its object identifier. Common names often include ifIndex, sysObjectId, etc al. These names are the names of particular variables as defined by the SMI. Should the instance also be part of a table, then the column number of the instance is also stored in the object.


Field Summary
static String SNMPCOUNTER32
          Constant SNMPCOUNTER32="org.opennms.protocols.snmp.SnmpCounter3"{trunked}
static String SNMPCOUNTER64
          Constant SNMPCOUNTER64="org.opennms.protocols.snmp.SnmpCounter6"{trunked}
static String SNMPENDOFMIBVIEW
          Constant SNMPENDOFMIBVIEW="org.opennms.protocols.snmp.SnmpEndOfMib"{trunked}
static String SNMPGAUGE32
          Constant SNMPGAUGE32="org.opennms.protocols.snmp.SnmpGauge32"
static String SNMPINT32
          Constant SNMPINT32="org.opennms.protocols.snmp.SnmpInt32"
static String SNMPIPADDRESS
          Constant SNMPIPADDRESS="org.opennms.protocols.snmp.SnmpIPAddres"{trunked}
static String SNMPNOSUCHINSTANCE
          Constant SNMPNOSUCHINSTANCE="org.opennms.protocols.snmp.SnmpNoSuchIn"{trunked}
static String SNMPNOSUCHOBJECT
          Constant SNMPNOSUCHOBJECT="org.opennms.protocols.snmp.SnmpNoSuchOb"{trunked}
static String SNMPNULL
          Constant SNMPNULL="org.opennms.protocols.snmp.SnmpNull"
static String SNMPOBJECTID
          Constant SNMPOBJECTID="org.opennms.protocols.snmp.SnmpObjectId"
static String SNMPOCTETSTRING
          Constant SNMPOCTETSTRING="org.opennms.protocols.snmp.SnmpOctetStr"{trunked}
static String SNMPOPAQUE
          Constant SNMPOPAQUE="org.opennms.protocols.snmp.SnmpOpaque"
static String SNMPTIMETICKS
          Constant SNMPTIMETICKS="org.opennms.protocols.snmp.SnmpTimeTick"{trunked}
static String SNMPUINT32
          Constant SNMPUINT32="org.opennms.protocols.snmp.SnmpUInt32"
static String SNMPV2PARTYCLOCK
          Constant SNMPV2PARTYCLOCK="org.opennms.protocols.snmp.SnmpV2PartyC"{trunked}
 
Constructor Summary
NamedSnmpVar(String type, String alias, String oid)
          This constructor creates a new instance of the class with the type, alias and object identifier.
NamedSnmpVar(String type, String alias, String oid, int column)
          This constructor creates a new instance of the class with the type, alias, object identifier, and table column set.
 
Method Summary
 String getAlias()
          Returns the alias for the object identifier.
 CollectionTracker getCollectionTracker(Set<SnmpInstId> instances)
          getCollectionTracker
 int getColumn()
          Returns the column of the table this instance is in.
 String getOid()
          Returns the object identifer for this instance.
 SnmpObjId getSnmpObjId()
          getSnmpObjId
static CollectionTracker[] getTrackersFor(NamedSnmpVar[] ms_elemList)
          getTrackersFor
static CollectionTracker[] getTrackersFor(NamedSnmpVar[] columns, Set<SnmpInstId> instances)
          getTrackersFor
 String getType()
          Returns the class name stored in m_type which represents the expected SNMP data type of the object.
 Class<?> getTypeClass()
          Returns the class object associated with the class name stored in m_type.
 boolean isTableEntry()
          Returns true if this instance is part of a table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SNMPINT32

public static final String SNMPINT32
Constant SNMPINT32="org.opennms.protocols.snmp.SnmpInt32"

See Also:
Constant Field Values

SNMPUINT32

public static final String SNMPUINT32
Constant SNMPUINT32="org.opennms.protocols.snmp.SnmpUInt32"

See Also:
Constant Field Values

SNMPCOUNTER32

public static final String SNMPCOUNTER32
Constant SNMPCOUNTER32="org.opennms.protocols.snmp.SnmpCounter3"{trunked}

See Also:
Constant Field Values

SNMPCOUNTER64

public static final String SNMPCOUNTER64
Constant SNMPCOUNTER64="org.opennms.protocols.snmp.SnmpCounter6"{trunked}

See Also:
Constant Field Values

SNMPGAUGE32

public static final String SNMPGAUGE32
Constant SNMPGAUGE32="org.opennms.protocols.snmp.SnmpGauge32"

See Also:
Constant Field Values

SNMPTIMETICKS

public static final String SNMPTIMETICKS
Constant SNMPTIMETICKS="org.opennms.protocols.snmp.SnmpTimeTick"{trunked}

See Also:
Constant Field Values

SNMPOCTETSTRING

public static final String SNMPOCTETSTRING
Constant SNMPOCTETSTRING="org.opennms.protocols.snmp.SnmpOctetStr"{trunked}

See Also:
Constant Field Values

SNMPOPAQUE

public static final String SNMPOPAQUE
Constant SNMPOPAQUE="org.opennms.protocols.snmp.SnmpOpaque"

See Also:
Constant Field Values

SNMPIPADDRESS

public static final String SNMPIPADDRESS
Constant SNMPIPADDRESS="org.opennms.protocols.snmp.SnmpIPAddres"{trunked}

See Also:
Constant Field Values

SNMPOBJECTID

public static final String SNMPOBJECTID
Constant SNMPOBJECTID="org.opennms.protocols.snmp.SnmpObjectId"

See Also:
Constant Field Values

SNMPV2PARTYCLOCK

public static final String SNMPV2PARTYCLOCK
Constant SNMPV2PARTYCLOCK="org.opennms.protocols.snmp.SnmpV2PartyC"{trunked}

See Also:
Constant Field Values

SNMPNOSUCHINSTANCE

public static final String SNMPNOSUCHINSTANCE
Constant SNMPNOSUCHINSTANCE="org.opennms.protocols.snmp.SnmpNoSuchIn"{trunked}

See Also:
Constant Field Values

SNMPNOSUCHOBJECT

public static final String SNMPNOSUCHOBJECT
Constant SNMPNOSUCHOBJECT="org.opennms.protocols.snmp.SnmpNoSuchOb"{trunked}

See Also:
Constant Field Values

SNMPENDOFMIBVIEW

public static final String SNMPENDOFMIBVIEW
Constant SNMPENDOFMIBVIEW="org.opennms.protocols.snmp.SnmpEndOfMib"{trunked}

See Also:
Constant Field Values

SNMPNULL

public static final String SNMPNULL
Constant SNMPNULL="org.opennms.protocols.snmp.SnmpNull"

See Also:
Constant Field Values
Constructor Detail

NamedSnmpVar

public NamedSnmpVar(String type,
                    String alias,
                    String oid)
This constructor creates a new instance of the class with the type, alias and object identifier. The instance is not considered to be part of a table.

Parameters:
type - The expected SNMP data type of this object.
alias - The alias for the object identifier.
oid - The object identifier for the instance.

NamedSnmpVar

public NamedSnmpVar(String type,
                    String alias,
                    String oid,
                    int column)
This constructor creates a new instance of the class with the type, alias, object identifier, and table column set. The instance is considered to be part of a table and the column is the "instance" number for the table.

Parameters:
type - The expected SNMP data type of this object.
alias - The alias for the object identifier.
oid - The object identifier for the instance.
column - The column entry for its table.
Method Detail

getType

public String getType()
Returns the class name stored in m_type which represents the expected SNMP data type of the object.

Returns:
a String object.

getTypeClass

public Class<?> getTypeClass()
                      throws ClassNotFoundException
Returns the class object associated with the class name stored in m_type.

Returns:
a Class object.
Throws:
ClassNotFoundException - Thrown from this method if forName() fails.
ClassNotFoundException - if any.

getAlias

public String getAlias()
Returns the alias for the object identifier.

Returns:
a String object.

getOid

public String getOid()
Returns the object identifer for this instance.

Returns:
a String object.

getSnmpObjId

public SnmpObjId getSnmpObjId()

getSnmpObjId

Returns:
a SnmpObjId object.

isTableEntry

public boolean isTableEntry()
Returns true if this instance is part of a table.

Returns:
a boolean.

getCollectionTracker

public CollectionTracker getCollectionTracker(Set<SnmpInstId> instances)

getCollectionTracker

Parameters:
instances - a Set object.
Returns:
a CollectionTracker object.

getColumn

public int getColumn()
Returns the column of the table this instance is in. If the instance is not part of a table then the return code is not defined.

Returns:
a int.

getTrackersFor

public static CollectionTracker[] getTrackersFor(NamedSnmpVar[] columns,
                                                 Set<SnmpInstId> instances)

getTrackersFor

Parameters:
columns - an array of NamedSnmpVar objects.
instances - a Set object.
Returns:
an array of CollectionTracker objects.

getTrackersFor

public static CollectionTracker[] getTrackersFor(NamedSnmpVar[] ms_elemList)

getTrackersFor

Parameters:
ms_elemList - an array of NamedSnmpVar objects.
Returns:
an array of CollectionTracker objects.


Copyright © 2011. All Rights Reserved.