1. /*
  2. * @(#)file SnmpStandardMetaServer.java
  3. * @(#)author Sun Microsystems, Inc.
  4. * @(#)version 1.6
  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. package com.sun.jmx.snmp.agent;
  11. // jmx imports
  12. //
  13. import com.sun.jmx.snmp.SnmpValue;
  14. import com.sun.jmx.snmp.SnmpStatusException;
  15. /**
  16. * <p>
  17. * This interface defines the methods that must be implemented by an
  18. * SNMP metadata object that needs to interact with an
  19. * {@link com.sun.jmx.snmp.agent.SnmpStandardObjectServer} object.
  20. * </p>
  21. * <p>
  22. * All these methods are usually generated by <code>mibgen</code> when
  23. * run in standard-metadata mode (default).
  24. * </p>
  25. * <p><b><i>
  26. * This interface is used internally between the generated Metadata and
  27. * the SNMP runtime and you shouldn't need to worry about it, because
  28. * you will never have to use it directly.
  29. * </b></i></p>
  30. *
  31. * <p><b>This API is a Sun Microsystems internal API and is subject
  32. * to change without notice.</b></p>
  33. **/
  34. public interface SnmpStandardMetaServer {
  35. /**
  36. * Returns the value of the scalar object identified by the given
  37. * OID arc.
  38. *
  39. * @param arc OID arc of the querried scalar object.
  40. *
  41. * @return The <CODE>SnmpValue</CODE> of the scalar object identified
  42. * by <CODE>arc</CODE>.
  43. *
  44. * @param userData A contextual object containing user-data.
  45. * This object is allocated through the <code>
  46. * {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
  47. * for each incoming SNMP request.
  48. *
  49. * @exception SnmpStatusException If the arc is not valid, or if
  50. * access is denied.
  51. *
  52. **/
  53. public SnmpValue get(long arc, Object userData)
  54. throws SnmpStatusException ;
  55. /**
  56. * Sets the value of the scalar object identified by the given
  57. * OID arc.
  58. *
  59. * @param x New value for the scalar object identified by
  60. * <CODE>arc</CODE>
  61. *
  62. * @param arc OID arc of the scalar object whose value is set.
  63. *
  64. * @return The new <CODE>SnmpValue</CODE> of the scalar object
  65. * identified by <CODE>arc</CODE>.
  66. *
  67. * @param userData A contextual object containing user-data.
  68. * This object is allocated through the <code>
  69. * {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
  70. * for each incoming SNMP request.
  71. *
  72. * @exception SnmpStatusException If the arc is not valid, or if
  73. * access is denied.
  74. *
  75. **/
  76. public SnmpValue set(SnmpValue x, long arc, Object userData)
  77. throws SnmpStatusException ;
  78. /**
  79. * Checks that the new desired value of the scalar object identified
  80. * by the given OID arc is valid.
  81. *
  82. * @param x New value for the scalar object identified by
  83. * <CODE>arc</CODE>
  84. *
  85. * @param arc OID arc of the scalar object whose value is set.
  86. *
  87. * @param userData A contextual object containing user-data.
  88. * This object is allocated through the <code>
  89. * {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory}</code>
  90. * for each incoming SNMP request.
  91. *
  92. * @exception SnmpStatusException If the arc is not valid, or if
  93. * access is denied, or if the new desired value is not valid.
  94. *
  95. **/
  96. public void check(SnmpValue x, long arc, Object userData)
  97. throws SnmpStatusException ;
  98. }