Package org.opennms.netmgt.snmp
Class NamedSnmpVar
- java.lang.Object
 - 
- org.opennms.netmgt.snmp.NamedSnmpVar
 
 
- 
public final class NamedSnmpVar extends java.lang.ObjectThe 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
Fields Modifier and Type Field Description static java.lang.StringSNMPCOUNTER32ConstantSNMPCOUNTER32="org.opennms.protocols.snmp.SnmpCounter3"{trunked}static java.lang.StringSNMPCOUNTER64ConstantSNMPCOUNTER64="org.opennms.protocols.snmp.SnmpCounter6"{trunked}static java.lang.StringSNMPENDOFMIBVIEWConstantSNMPENDOFMIBVIEW="org.opennms.protocols.snmp.SnmpEndOfMib"{trunked}static java.lang.StringSNMPGAUGE32ConstantSNMPGAUGE32="org.opennms.protocols.snmp.SnmpGauge32"static java.lang.StringSNMPINT32ConstantSNMPINT32="org.opennms.protocols.snmp.SnmpInt32"static java.lang.StringSNMPIPADDRESSConstantSNMPIPADDRESS="org.opennms.protocols.snmp.SnmpIPAddres"{trunked}static java.lang.StringSNMPNOSUCHINSTANCEConstantSNMPNOSUCHINSTANCE="org.opennms.protocols.snmp.SnmpNoSuchIn"{trunked}static java.lang.StringSNMPNOSUCHOBJECTConstantSNMPNOSUCHOBJECT="org.opennms.protocols.snmp.SnmpNoSuchOb"{trunked}static java.lang.StringSNMPNULLConstantSNMPNULL="org.opennms.protocols.snmp.SnmpNull"static java.lang.StringSNMPOBJECTIDConstantSNMPOBJECTID="org.opennms.protocols.snmp.SnmpObjectId"static java.lang.StringSNMPOCTETSTRINGConstantSNMPOCTETSTRING="org.opennms.protocols.snmp.SnmpOctetStr"{trunked}static java.lang.StringSNMPOPAQUEConstantSNMPOPAQUE="org.opennms.protocols.snmp.SnmpOpaque"static java.lang.StringSNMPTIMETICKSConstantSNMPTIMETICKS="org.opennms.protocols.snmp.SnmpTimeTick"{trunked}static java.lang.StringSNMPUINT32ConstantSNMPUINT32="org.opennms.protocols.snmp.SnmpUInt32"static java.lang.StringSNMPV2PARTYCLOCKConstantSNMPV2PARTYCLOCK="org.opennms.protocols.snmp.SnmpV2PartyC"{trunked} 
- 
Constructor Summary
Constructors Constructor Description NamedSnmpVar(java.lang.String type, java.lang.String alias, java.lang.String oid)This constructor creates a new instance of the class with the type, alias and object identifier.NamedSnmpVar(java.lang.String type, java.lang.String alias, java.lang.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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAlias()Returns the alias for the object identifier.CollectionTrackergetCollectionTracker(java.util.Set<SnmpInstId> instances)getCollectionTrackerintgetColumn()Returns the column of the table this instance is in.java.lang.StringgetOid()Returns the object identifer for this instance.SnmpObjIdgetSnmpObjId()getSnmpObjIdstatic CollectionTracker[]getTrackersFor(NamedSnmpVar[] columns)getTrackersForstatic CollectionTracker[]getTrackersFor(NamedSnmpVar[] columns, java.util.Set<SnmpInstId> instances)getTrackersForjava.lang.StringgetType()Returns the class name stored in m_type which represents the expected SNMP data type of the object.java.lang.Class<?>getTypeClass()Returns the class object associated with the class name stored in m_type.booleanisTableEntry()Returns true if this instance is part of a table. 
 - 
 
- 
- 
Field Detail
- 
SNMPINT32
public static final java.lang.String SNMPINT32
ConstantSNMPINT32="org.opennms.protocols.snmp.SnmpInt32"- See Also:
 - Constant Field Values
 
 
- 
SNMPUINT32
public static final java.lang.String SNMPUINT32
ConstantSNMPUINT32="org.opennms.protocols.snmp.SnmpUInt32"- See Also:
 - Constant Field Values
 
 
- 
SNMPCOUNTER32
public static final java.lang.String SNMPCOUNTER32
ConstantSNMPCOUNTER32="org.opennms.protocols.snmp.SnmpCounter3"{trunked}- See Also:
 - Constant Field Values
 
 
- 
SNMPCOUNTER64
public static final java.lang.String SNMPCOUNTER64
ConstantSNMPCOUNTER64="org.opennms.protocols.snmp.SnmpCounter6"{trunked}- See Also:
 - Constant Field Values
 
 
- 
SNMPGAUGE32
public static final java.lang.String SNMPGAUGE32
ConstantSNMPGAUGE32="org.opennms.protocols.snmp.SnmpGauge32"- See Also:
 - Constant Field Values
 
 
- 
SNMPTIMETICKS
public static final java.lang.String SNMPTIMETICKS
ConstantSNMPTIMETICKS="org.opennms.protocols.snmp.SnmpTimeTick"{trunked}- See Also:
 - Constant Field Values
 
 
- 
SNMPOCTETSTRING
public static final java.lang.String SNMPOCTETSTRING
ConstantSNMPOCTETSTRING="org.opennms.protocols.snmp.SnmpOctetStr"{trunked}- See Also:
 - Constant Field Values
 
 
- 
SNMPOPAQUE
public static final java.lang.String SNMPOPAQUE
ConstantSNMPOPAQUE="org.opennms.protocols.snmp.SnmpOpaque"- See Also:
 - Constant Field Values
 
 
- 
SNMPIPADDRESS
public static final java.lang.String SNMPIPADDRESS
ConstantSNMPIPADDRESS="org.opennms.protocols.snmp.SnmpIPAddres"{trunked}- See Also:
 - Constant Field Values
 
 
- 
SNMPOBJECTID
public static final java.lang.String SNMPOBJECTID
ConstantSNMPOBJECTID="org.opennms.protocols.snmp.SnmpObjectId"- See Also:
 - Constant Field Values
 
 
- 
SNMPV2PARTYCLOCK
public static final java.lang.String SNMPV2PARTYCLOCK
ConstantSNMPV2PARTYCLOCK="org.opennms.protocols.snmp.SnmpV2PartyC"{trunked}- See Also:
 - Constant Field Values
 
 
- 
SNMPNOSUCHINSTANCE
public static final java.lang.String SNMPNOSUCHINSTANCE
ConstantSNMPNOSUCHINSTANCE="org.opennms.protocols.snmp.SnmpNoSuchIn"{trunked}- See Also:
 - Constant Field Values
 
 
- 
SNMPNOSUCHOBJECT
public static final java.lang.String SNMPNOSUCHOBJECT
ConstantSNMPNOSUCHOBJECT="org.opennms.protocols.snmp.SnmpNoSuchOb"{trunked}- See Also:
 - Constant Field Values
 
 
- 
SNMPENDOFMIBVIEW
public static final java.lang.String SNMPENDOFMIBVIEW
ConstantSNMPENDOFMIBVIEW="org.opennms.protocols.snmp.SnmpEndOfMib"{trunked}- See Also:
 - Constant Field Values
 
 
- 
SNMPNULL
public static final java.lang.String SNMPNULL
ConstantSNMPNULL="org.opennms.protocols.snmp.SnmpNull"- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Constructor Detail
- 
NamedSnmpVar
public NamedSnmpVar(java.lang.String type, java.lang.String alias, java.lang.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(java.lang.String type, java.lang.String alias, java.lang.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 java.lang.String getType()
Returns the class name stored in m_type which represents the expected SNMP data type of the object.- Returns:
 - a 
Stringobject. 
 
- 
getTypeClass
public java.lang.Class<?> getTypeClass() throws java.lang.ClassNotFoundExceptionReturns the class object associated with the class name stored in m_type.- Returns:
 - a 
Classobject. - Throws:
 java.lang.ClassNotFoundException- Thrown from this method if forName() fails.java.lang.ClassNotFoundException- if any.
 
- 
getAlias
public java.lang.String getAlias()
Returns the alias for the object identifier.- Returns:
 - a 
Stringobject. 
 
- 
getOid
public java.lang.String getOid()
Returns the object identifer for this instance.- Returns:
 - a 
Stringobject. 
 
- 
isTableEntry
public boolean isTableEntry()
Returns true if this instance is part of a table.- Returns:
 - a boolean.
 
 
- 
getCollectionTracker
public CollectionTracker getCollectionTracker(java.util.Set<SnmpInstId> instances)
getCollectionTracker
- Parameters:
 instances- aSetobject.- Returns:
 - a 
CollectionTrackerobject. 
 
- 
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, java.util.Set<SnmpInstId> instances)
getTrackersFor
- Parameters:
 columns- an array ofNamedSnmpVarobjects.instances- aSetobject.- Returns:
 - an array of 
CollectionTrackerobjects. 
 
- 
getTrackersFor
public static CollectionTracker[] getTrackersFor(NamedSnmpVar[] columns)
getTrackersFor
- Parameters:
 columns- an array ofNamedSnmpVarobjects.- Returns:
 - an array of 
CollectionTrackerobjects. 
 
 - 
 
 -