com.sun.management.snmp
Class SnmpOidDatabaseSupport

java.lang.Object
  extended by com.sun.management.snmp.SnmpOidDatabaseSupport
All Implemented Interfaces:
SnmpOidDatabase, SnmpOidTable

public class SnmpOidDatabaseSupport
extends Object
implements SnmpOidDatabase

Defines a set of SnmpOidTable objects containing metadata definitions for MIB variables. Each SnmpOidTable should contain information on variables of one MIB. It provides resolution of all MIB variables contained in the SnmpOidTable objects.

Since:
Java DMK 5.1

Constructor Summary
SnmpOidDatabaseSupport()
          Creates an empty SnmpOidDatabaseSupport.
SnmpOidDatabaseSupport(SnmpOidTable table)
          Creates an SnmpOidDatabaseSupport containing the specified SnmpOidTable object.
 
Method Summary
 void add(SnmpOidTable table)
          Adds a SnmpOidTable object in this SnmpOidDatabase.
 Vector getAllEntries()
          Returns a list that can be used to traverse all the entries of the SnmpOidTable objects of this SnmpOidDatabase.
 void remove(SnmpOidTable table)
          Removes a SnmpOidTable object from this SnmpOidDatabase.
 void removeAll()
          Removes all SnmpOidTable objects from this SnmpOidDatabase.
 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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SnmpOidDatabaseSupport

public SnmpOidDatabaseSupport()
Creates an empty SnmpOidDatabaseSupport.


SnmpOidDatabaseSupport

public SnmpOidDatabaseSupport(SnmpOidTable table)
Creates an SnmpOidDatabaseSupport containing the specified SnmpOidTable object.

Parameters:
table - The SnmpOidTable object used to initialize this SnmpOidDatabaseSupport.
Method Detail

add

public void add(SnmpOidTable table)
Adds a SnmpOidTable object in this SnmpOidDatabase.

Specified by:
add in interface SnmpOidDatabase
Parameters:
table - The table to add.

remove

public void remove(SnmpOidTable table)
            throws SnmpStatusException
Removes a SnmpOidTable object from this SnmpOidDatabase.

Specified by:
remove in interface SnmpOidDatabase
Parameters:
table - The table to be removed.
Throws:
SnmpStatusException - The specified SnmpOidTable does not exist in this SnmpOidDatabase.

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 SnmpOidDatabase
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 - The specified name does not exist in this SnmpOidDatabase

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 SnmpOidDatabase
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 - The specified oid does not exist in this SnmpOidDatabase.

getAllEntries

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

Specified by:
getAllEntries in interface SnmpOidDatabase
Specified by:
getAllEntries in interface SnmpOidTable
Returns:
A vector of SnmpOidTable objects containing all the elements of this SnmpOidDatabase.

removeAll

public void removeAll()
Removes all SnmpOidTable objects from this SnmpOidDatabase.

Specified by:
removeAll in interface SnmpOidDatabase

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.