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