org.opennms.bb.dp.capsd.snmp
Class NamedSnmpVar

java.lang.Object
  |
  +--org.opennms.bb.dp.capsd.snmp.NamedSnmpVar

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.

Version:
$Revision: 1.4 $
Author:
Brian Weaver, Mike Davidson, OpenNMS

Field Summary
private  int m_column
          If the instance is part of a table then this is the column number for the element.
private  boolean m_isTabular
          If set then the object identifier is an entry some SNMP table.
private  String m_name
          The alias name for the object identifier.
private  String m_oid
          The actual object identifer string for the object.
private  String m_type
          String which contains the Class name of the expected SNMP data type for the object.
private  Class m_typeClass
          The class object for the class name stored in the m_type string.
static String SNMPCOUNTER32
           
static String SNMPENDOFMIBVIEW
           
static String SNMPGAUGE32
           
static String SNMPINT32
           
static String SNMPIPADDRESS
           
static String SNMPNOSUCHINSTANCE
           
static String SNMPNOSUCHOBJECT
           
static String SNMPNULL
           
static String SNMPOBJECTID
           
static String SNMPOCTETSTRING
           
static String SNMPOPAQUE
           
static String SNMPTIMETICKS
           
static String SNMPUINT32
           
static String SNMPV2PARTYCLOCK
           
 
Constructor Summary
private NamedSnmpVar()
          The class default constructor.
(package private) NamedSnmpVar(String type, String alias, String oid)
          This constructor creates a new instance of the class with the type, alias and object identifier.
(package private) 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
(package private)  String getAlias()
          Returns the alias for the object identifier.
(package private)  int getColumn()
          Returns the column of the table this instance is in.
(package private)  String getOid()
          Returns the object identifer for this instance.
(package private)  String getType()
          Returns the class name stored in m_type which represents the expected SNMP data type of the object.
(package private)  Class getTypeClass()
          Returns the class object associated with the class name stored in m_type.
(package private)  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, registerNatives, toString, wait, wait, wait
 

Field Detail

m_type

private String m_type

String which contains the Class name of the expected SNMP data type for the object.


m_typeClass

private Class m_typeClass

The class object for the class name stored in the m_type string.


m_name

private String m_name

The alias name for the object identifier.


m_oid

private String m_oid

The actual object identifer string for the object.


m_isTabular

private boolean m_isTabular

If set then the object identifier is an entry some SNMP table.


m_column

private int m_column

If the instance is part of a table then this is the column number for the element.


SNMPINT32

public static final String SNMPINT32

SNMPUINT32

public static final String SNMPUINT32

SNMPCOUNTER32

public static final String SNMPCOUNTER32

SNMPGAUGE32

public static final String SNMPGAUGE32

SNMPTIMETICKS

public static final String SNMPTIMETICKS

SNMPOCTETSTRING

public static final String SNMPOCTETSTRING

SNMPOPAQUE

public static final String SNMPOPAQUE

SNMPIPADDRESS

public static final String SNMPIPADDRESS

SNMPOBJECTID

public static final String SNMPOBJECTID

SNMPV2PARTYCLOCK

public static final String SNMPV2PARTYCLOCK

SNMPNOSUCHINSTANCE

public static final String SNMPNOSUCHINSTANCE

SNMPNOSUCHOBJECT

public static final String SNMPNOSUCHOBJECT

SNMPENDOFMIBVIEW

public static final String SNMPENDOFMIBVIEW

SNMPNULL

public static final String SNMPNULL
Constructor Detail

NamedSnmpVar

private NamedSnmpVar()
              throws UnsupportedOperationException

The class default constructor. The default constructor is disallowed in this class and thus the unsupported operation exception is always thrown by this constructor.

Throws:
UnsupportedOperationException - Always thrown by this constructor.

NamedSnmpVar

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

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

String getType()

Returns the class name stored in m_type which represents the expected SNMP data type of the object.


getTypeClass

Class getTypeClass()
             throws ClassNotFoundException

Returns the class object associated with the class name stored in m_type.

Throws:
ClassNotFoundException - Thrown from this method if forName() fails.

getAlias

String getAlias()

Returns the alias for the object identifier.


getOid

String getOid()

Returns the object identifer for this instance.


isTableEntry

boolean isTableEntry()

Returns true if this instance is part of a table.


getColumn

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.