com.outbackinc.services.protocol.snmp.mib
Interface SnmpMIBDictionary

All Known Implementing Classes:
SimpleMIBDictionary

public interface SnmpMIBDictionary

Defines the service interface for MIBDictionary implementations.

A MIB Dictionary allows users to get information regarding SNMP names in a particular mib.

Usage: The following code snippet provides an example of its use:

      // Create the service
      SnmpMIBService cSnmpMIBService = SnmpLocalInterfaces.getMIBService();
 
      // Load the IF-MIB MIB file into the service
      InputStream cInputStream = jMIBC.loadMib("IF-MIB.my");
      cSnmpMIBService.loadMIB("IF-MIB", cInputStream);

      // Or alternately, load the IF-MIB jMIB file into the service
      //cSnmpMIBService.loadMIB("IF-MIB", new FileInputStream("IF-MIB.jmib"));
 
      // Get a handle to the mib dictionary for the MIB
      SnmpMIBDictionary cSnmpMIBDictionary = service.getMIBDictionary("IF-MIB");
 
      // Resolve name to OID (will return 1.3.6.1.2.1.2.2.1.10):
      String szOid = cSnmpMIBDictionary.resolveName("ifInOctets");
      
      // Resolve name to OID (will return 1.3.6.1.2.1.2.2.1.10.1):
      szOid = cSnmpMIBDictionary.resolveName("ifInOctets.1");

      // Resolve OID to name (will return ifInOctets):
      String szName = cSnmpMIBDictionary.resolveOID("1.3.6.1.2.1.2.2.1.10");
 
      // Resolve OID to name (will return ifInOctets.1):
      szName = cSnmpMIBDictionary.resolveOID("1.3.6.1.2.1.2.2.1.10.1");

      // Resolve name to name description (will return "The total number ...")
      String szDescription = cSnmpMIBDictionary.resolveNameDescription("ifInOctets");
 
      // Resolve OID to OID description (will return "The total number ...")
      szDescription = cSnmpMIBDictionary.resolveOIDDescription("1.3.6.1.2.1.2.2.1.10");
 
      // Resolve name to name type (will return "Counter")
      String szType = cSnmpMIBDictionary.resolveNameType("ifInOctets");
 
      // Resolve OID to OID type (will return "Counter")
      szType = cSnmpMIBDictionary.resolveOIDType("1.3.6.1.2.1.2.2.1.10");
 
      // Resolve OID to OID 'abstract' type (will return "Counter")
      szType = cSnmpMIBDictionary.resolveOIDAbstractType("1.3.6.1.2.1.2.2.1.10");
 
      // Resolve name to name access (will return "read-only")
      String szAccess = cSnmpMIBDictionary.resolveNameAccess("ifInOctets");
 
      // Resolve OID to OID access (will return "read-only")
      szAccess = cSnmpMIBDictionary.resolveOIDAccess("1.3.6.1.2.1.2.2.1.10");
 
      // Resolve name to name status (will return "mandatory")
      String szStatus = cSnmpMIBDictionary.resolveNameStatus("ifInOctets");
 
      // Resolve OID to OID status (will return "mandatory")
      szStatus = cSnmpMIBDictionary.resolveOIDStatus("1.3.6.1.2.1.2.2.1.10");
 
      // Find enum string for enum int value (will return ethernetCsmacd):
      String szEnum = cSnmpMIBDictionary.resolveEnum("ifType", 6);

      // Find enum int for enum string value (wil return 6):
      int iEnum = cSnmpMIBDictionary.resolveEnumDisplayString("ifType",
                                                  "ethernetCsmacd");
 


Method Summary
 java.lang.String getMIBDictionaryName()
          Get the name of the MIB Dictionary object.
 java.lang.String resolveEnum(java.lang.String szName, int iValue)
          Resolve an enumerated value (as an integer) to the corresponding displayable name.
 int resolveEnumDisplayString(java.lang.String szName, java.lang.String szValue)
          Get the numeric value of a given string of an enumerated type.
 java.lang.String resolveName(java.lang.String szName)
          Find the Object ID for a given object name.
 java.lang.String resolveNameAbstractType(java.lang.String szName)
          Find the 'abstract' type for a given object name.
 java.lang.String resolveNameAccess(java.lang.String szName)
          Find the access for a given object name.
 java.lang.String resolveNameDescription(java.lang.String szName)
          Find the description for a given object name.
 java.lang.String resolveNameStatus(java.lang.String szName)
          Find the status for a given object name.
 java.lang.String resolveNameType(java.lang.String szName)
          Find the type for a given object name.
 java.lang.String resolveOID(java.lang.String szOid)
          Resolve an Object ID to its corresponding name.
 java.lang.String resolveOIDAbstractType(java.lang.String szOid)
          Resolve an Object ID to its corresponding 'abstract' type.
 java.lang.String resolveOIDAccess(java.lang.String szOid)
          Resolve an Object ID to its corresponding access.
 java.lang.String resolveOIDDescription(java.lang.String szOid)
          Resolve an Object ID to its corresponding description.
 java.lang.String resolveOIDStatus(java.lang.String szOid)
          Resolve an Object ID to its corresponding status.
 java.lang.String resolveOIDType(java.lang.String szOid)
          Resolve an Object ID to its corresponding type.
 

Method Detail

getMIBDictionaryName

public java.lang.String getMIBDictionaryName()
Get the name of the MIB Dictionary object.
Returns:
name of the MIB Dictionary object

resolveName

public java.lang.String resolveName(java.lang.String szName)
Find the Object ID for a given object name. Is capable of handling name with or without a suffix (ifType/ifType.0).
Parameters:
szName - Object name to resolve to its OID
Returns:
OID for the given object name, or null if not found

resolveOID

public java.lang.String resolveOID(java.lang.String szOid)
Resolve an Object ID to its corresponding name.
Parameters:
szOid - Object ID to resolve
Returns:
Object Name for the given OID or null if not found

resolveNameDescription

public java.lang.String resolveNameDescription(java.lang.String szName)
Find the description for a given object name. Is capable of handling name with or without a suffix (ifType/ifType.0).
Parameters:
szName - Object name to resolve to its OID
Returns:
Description for the given object name, or null if not found

resolveOIDDescription

public java.lang.String resolveOIDDescription(java.lang.String szOid)
Resolve an Object ID to its corresponding description.
Parameters:
szOid - Object ID to resolve
Returns:
Description for the given OID or null if not found

resolveNameType

public java.lang.String resolveNameType(java.lang.String szName)
Find the type for a given object name. Is capable of handling name with or without a suffix (ifType/ifType.0).
Parameters:
szName - Object name to resolve to its OID
Returns:
Type for the given object name, or null if not found

resolveOIDType

public java.lang.String resolveOIDType(java.lang.String szOid)
Resolve an Object ID to its corresponding type.
Parameters:
szOid - Object ID to resolve
Returns:
Type for the given OID or null if not found

resolveNameAbstractType

public java.lang.String resolveNameAbstractType(java.lang.String szName)
Find the 'abstract' type for a given object name. Is capable of handling name with or without a suffix (ifType/ifType.0).
Parameters:
szName - Object name to resolve to its OID
Returns:
Type for the given object name, or null if not found

resolveOIDAbstractType

public java.lang.String resolveOIDAbstractType(java.lang.String szOid)
Resolve an Object ID to its corresponding 'abstract' type.
Parameters:
szOid - Object ID to resolve
Returns:
Type for the given OID or null if not found

resolveNameAccess

public java.lang.String resolveNameAccess(java.lang.String szName)
Find the access for a given object name. Is capable of handling name with or without a suffix (ifType/ifType.0).
Parameters:
szName - Object name to resolve to its OID
Returns:
Access for the given object name, or null if not found

resolveOIDAccess

public java.lang.String resolveOIDAccess(java.lang.String szOid)
Resolve an Object ID to its corresponding access.
Parameters:
szOid - Object ID to resolve
Returns:
Access for the given OID or null if not found

resolveNameStatus

public java.lang.String resolveNameStatus(java.lang.String szName)
Find the status for a given object name. Is capable of handling name with or without a suffix (ifType/ifType.0).
Parameters:
szName - Object name to resolve to its OID
Returns:
Status for the given object name, or null if not found

resolveOIDStatus

public java.lang.String resolveOIDStatus(java.lang.String szOid)
Resolve an Object ID to its corresponding status.
Parameters:
szOid - Object ID to resolve
Returns:
Status for the given OID or null if not found

resolveEnum

public java.lang.String resolveEnum(java.lang.String szName,
                                    int iValue)
Resolve an enumerated value (as an integer) to the corresponding displayable name.
Parameters:
szName - object name (or OID)
iValue - current (integer) value
Returns:
displayable name corresponding to the supplied value

resolveEnumDisplayString

public int resolveEnumDisplayString(java.lang.String szName,
                                    java.lang.String szValue)
Get the numeric value of a given string of an enumerated type.
Parameters:
szName - object name (or OID)
szValue - displayable string value for the object
Returns:
integer value corresponding to the given displayable string value


Home  Services  Products  Purchase  Contact Us  About Us  Legal  Ceramics
Copyright © 2003-2008 jSNMP Enterprises All rights reserved.