1 /* 2 * @(#)file SnmpOidDatabase.java 3 * @(#)author Sun Microsystems, Inc. 4 * @(#)version 1.12 5 * @(#)date 08/02/09 6 * 7 * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 8 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 9 * 10 */ 11 12 13 package com.sun.jmx.snmp; 14 15 16 // java import 17 // 18 import java.util.Vector; 19 20 // jmx import 21 // 22 import com.sun.jmx.snmp.SnmpOidTable; 23 import com.sun.jmx.snmp.SnmpOidRecord; 24 import com.sun.jmx.snmp.SnmpStatusException; 25 26 /** 27 * Defines the minimal functionality that should be provided by 28 * a class containing a set of <CODE>SnmpOidTable</CODE> objects containing metadata definitions for MIB variables. 29 * Each <CODE>SnmpOidTable</CODE> should contain information on variables of one MIB. 30 * The <CODE>SnmpOidDatabase</CODE> is a "repository" of <CODE>SnmpOidTable</CODE>. 31 * It extends the <CODE>SnmpOidTable</CODE> interface in order to provide resolution of the MIB variables. 32 * <P> 33 * <p><b>This API is a Sun Microsystems internal API and is subject 34 * to change without notice.</b></p> 35 * @see com.sun.jmx.snmp.SnmpOidTable 36 */ 37 38 public interface SnmpOidDatabase extends SnmpOidTable { 39 40 /** 41 * Adds an <CODE>SnmpOidTable</CODE> object in this <CODE>SnmpOidDatabase</CODE>. 42 * @param table The table to add. 43 */ 44 public void add(SnmpOidTable table); 45 46 /** 47 * Removes an <CODE>SnmpOidTable</CODE> object from this <CODE>SnmpOidDatabase</CODE>. 48 * @param table The table to be removed. 49 */ 50 public void remove(SnmpOidTable table) throws SnmpStatusException; 51 52 /** 53 * Removes all the <CODE>SnmpOidTable</CODE> objects from this <CODE>SnmpOidDatabase</CODE>. 54 */ 55 public void removeAll(); 56 57 /** 58 * Searches for a MIB variable given its logical name and returns an <CODE>SnmpOidRecord</CODE> 59 * object containing information on the variable. 60 * @param name The name of the MIB variable. 61 * @return The <CODE>SnmpOidRecord</CODE> object containing information on the variable. 62 */ 63 public SnmpOidRecord resolveVarName(String name) throws SnmpStatusException ; 64 65 /** 66 * Searches for a MIB variable given its OID and returns an <CODE>SnmpOidRecord</CODE> object containing 67 * information on the variable. 68 * @param oid The OID of the MIB variable. 69 * @return The <CODE>SnmpOidRecord</CODE> object containing information on the variable. 70 */ 71 public SnmpOidRecord resolveVarOid(String oid) throws SnmpStatusException; 72 73 /** 74 * Returns a list that can be used to traverse all the entries of the <CODE>SnmpOidTable</CODE> objects 75 * of this <CODE>SnmpOidDatabase</CODE>. 76 * @return A vector of <CODE>SnmpOidTable</CODE> objects containing all the elements of this <CODE>SnmpOidDatabase</CODE>. 77 */ 78 public Vector getAllEntries() ; 79 } 80