com.sun.management.snmp
Class SnmpOidTableSupport

java.lang.Object
  extended by com.sun.management.snmp.SnmpOidTableSupport
All Implemented Interfaces:
SnmpOidTable
Direct Known Subclasses:
SNMP_USER_BASED_SM_MIBOidTable

public class SnmpOidTableSupport
extends Object
implements SnmpOidTable

Contains metadata definitions for MIB variables. A name can be resolved against a table of MIB variables. Each entry in the table is an SnmpOidRecord object that contains a name, a dot-separated OID string, and the corresponding SMI type of the variable.

If you need to load a specific SnmpOidTable, just call the static method SnmpOid.setSnmpOidTable(myOidTable).

Since:
Java DMK 5.1
See Also:
SnmpOidRecord

Constructor Summary
SnmpOidTableSupport(String name)
          Creates an SnmpOidTableSupport with the specified name.
 
Method Summary
 boolean equals(Object object)
          Checks if the specified Object is equal to this SnmpOidTableSupport.
 Vector getAllEntries()
          Returns a list that can be used to traverse all the entries in this SnmpOidTable.
 String getName()
          Returns the name identifying this SnmpOidTableSupport object.
 void loadMib(SnmpOidRecord[] mibs)
          Loads a list of variables into the storage area, which is kept in memory.
 SnmpOidRecord resolveVarName(String name)
          Searches for a MIB variable given its logical name and returns an SnmpOidRecord object containing information on the variable.
 SnmpOidRecord resolveVarOid(String oid)
          Searches for a MIB variable given its OID and returns an SnmpOidRecord object containing information on the variable.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SnmpOidTableSupport

public SnmpOidTableSupport(String name)
Creates an SnmpOidTableSupport with the specified name. This name identifies the MIB to which belong the MIB variables contained in this SnmpOidTableSupport object.

Parameters:
name - The OID table name.
Method Detail

resolveVarName

public SnmpOidRecord resolveVarName(String name)
                             throws SnmpStatusException
Searches for a MIB variable given its logical name and returns an SnmpOidRecord object containing information on the variable.

Specified by:
resolveVarName in interface SnmpOidTable
Parameters:
name - The name of the MIB variable.
Returns:
The SnmpOidRecord object containing information on the variable.
Throws:
SnmpStatusException - If the variable is not found.

resolveVarOid

public SnmpOidRecord resolveVarOid(String oid)
                            throws SnmpStatusException
Searches for a MIB variable given its OID and returns an SnmpOidRecord object containing information on the variable.

Specified by:
resolveVarOid in interface SnmpOidTable
Parameters:
oid - The OID of the MIB variable.
Returns:
The SnmpOidRecord object containing information on the variable.
Throws:
SnmpStatusException - If the variable is not found.

getAllEntries

public Vector getAllEntries()
Returns a list that can be used to traverse all the entries in this SnmpOidTable.

Specified by:
getAllEntries in interface SnmpOidTable
Returns:
A vector of SnmpOidRecord objects.

loadMib

public void loadMib(SnmpOidRecord[] 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.

Parameters:
mibs - The list of variables to load.

equals

public boolean equals(Object object)
Checks if the specified Object is equal to this SnmpOidTableSupport.

Overrides:
equals in class Object
Parameters:
object - The Object to be compared.
Returns:
true if object is an SnmpOidTableSupport instance and equals to this, false otherwise.

getName

public String getName()
Returns the name identifying this SnmpOidTableSupport object.

Returns:
The OID table name.

Open Source build 02
opendmk-1.0-b02 2007.10.01_19:17:46_MEST

Copyright 1998-2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.