All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.jaw.snmp.manager.MibStore

java.lang.Object
   |
   +----com.sun.jaw.snmp.manager.MibStore

public class MibStore
extends Object
implements MibStoreIfSrv, SnmpDataTypeEnums
This class maintains a database of management information base (MIB) variables. Each entry in database contains a name, a dot-separated OID string, and the corresponding SMI type of the variable. A name can be resolved against the database. If the variable is not found an exception is raised.


Constructor Index

 o MibStore()

Method Index

 o addMib(MibStoreIfSrv)
This method loads all of the MIB entries of object which supports the MibStoreIfSrv.
 o getSysUpTimeOid()
Get the object identifier corresponding to SysUpTimeOid as defined in MIBII.
 o getSysUpTimeOid0()
Get the object identifier corresponding to SysUpTimeOid variable instance.
 o loadMib(String[][])
Loads a list of variables into the storage area, which is kept in memory.
 o mapNameToType(String)
Returns the type code as defined in SnmpDataTypeEnums if it is given the code name of a type (as stored in a MibStoreIfSrv).
 o mapTypeToName(int)
Returns the string representation of a type if it is given the type code.
 o mibElements()
Returns a list that can be used to traverse the MIB database currently loaded in MIB store house.
 o resolveMibVariable(String)
Searches for the variable or the OID and returns the array.

Constructors

 o MibStore
 public MibStore() throws SnmpStatusException
Throws: SnmpStatusException
An error occurred while accessing a MIB node.

Methods

 o mibElements
 public Vector mibElements()
Returns a list that can be used to traverse the MIB database currently loaded in MIB store house.

Returns:
Vector for the MIB elements. A MIB element is an array of Strings. A MIB element contains a name, a dot-separated OID String, and the corresponding SMI type of the variable.
 o resolveMibVariable
 public String[] resolveMibVariable(String name) throws SnmpStatusException
Searches for the variable or the OID and returns the array. The method allows to query the metadata. One can retrieve metadata information associated to a SNMP variable, an object identifier, or an object identifier prefixed with '.' (ala CMU).

Parameters:
name - The name of the MIB variable.
Returns:
Array of a string containing parameters.
Throws: SnmpStatusException
if an variable is not found.
 o loadMib
 public static synchronized void loadMib(String mibs[][])
Loads a list of variables into the storage area, which is kept in memory. If you have new MIB variables, this method can be called to load them.

 o addMib
 public static synchronized void addMib(MibStoreIfSrv aStore) throws SnmpStatusException
This method loads all of the MIB entries of object which supports the MibStoreIfSrv. If there are any MIB variables which have the same name as previous loaded variables the previously loaded variables will be overwritten.

Throws: SnmpStatusException
An error occurred while accessing a MIB node.
 o mapTypeToName
 public String mapTypeToName(int type)
Returns the string representation of a type if it is given the type code. The names returned can be one of: Integer32, Gauge32, Counter32, Counter64,TimeTicks, String, Object Identifier, Null, Opaque, Unsigned32, IpAddress, Table Entry (if the variable corresponds to a table entry), Table (if the variable corresponds to a table), Unknown.

 o mapNameToType
 public int mapNameToType(String s)
Returns the type code as defined in SnmpDataTypeEnums if it is given the code name of a type (as stored in a MibStoreIfSrv).

Parameters:
s - the code name of a type.
Returns:
type code.
 o getSysUpTimeOid
 public SnmpOid getSysUpTimeOid() throws SnmpStatusException
Get the object identifier corresponding to SysUpTimeOid as defined in MIBII.

Throws: SnmpStatusException
if SysUpTimeOid is not definied in the repository.
See Also:
getSysUpTimeOid0
 o getSysUpTimeOid0
 public SnmpOid getSysUpTimeOid0() throws SnmpStatusException
Get the object identifier corresponding to SysUpTimeOid variable instance.

Throws: SnmpStatusException
if SysUpTimeOid is not definied in the repository.
See Also:
getSysUpTimeOid

All Packages  Class Hierarchy  This Package  Previous  Next  Index