1. /*
  2. * @(#)file SnmpInformHandler.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. */
  11. package com.sun.jmx.snmp.daemon ;
  12. // JMX imports
  13. //
  14. import com.sun.jmx.snmp.SnmpDefinitions;
  15. import com.sun.jmx.snmp.SnmpVarBindList;
  16. /**
  17. * Provides the callback methods that are required to be implemented by the application
  18. * when an inform response is received by the agent.
  19. * <P>
  20. * Each inform request can be provided with an object that implements this callback
  21. * interface. An application then uses the SNMP adaptor to start an SNMP inform request,
  22. * which marks the request as active. The methods in this callback interface
  23. * get invoked when any of the following happens:
  24. * <P>
  25. * <UL>
  26. * <LI> The agent receives the SNMP inform response.
  27. * <LI> The agent does not receive any response within a specified time and the number of tries
  28. * have exceeded the limit (timeout condition).
  29. * <LI> An internal error occurs while processing or parsing the inform request.
  30. * </UL>
  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 SnmpInformHandler extends SnmpDefinitions {
  35. /**
  36. * This callback is invoked when a manager responds to an SNMP inform request.
  37. * The callback should check the error status of the inform request to determine
  38. * the kind of response.
  39. *
  40. * @param request The <CODE>SnmpInformRequest</CODE> associated with this callback.
  41. * @param errStatus The status of the request.
  42. * @param errIndex The index in the list that caused the error.
  43. * @param vblist The <CODE>Response varBind</CODE> list for the successful request.
  44. */
  45. public abstract void processSnmpPollData(SnmpInformRequest request, int errStatus, int errIndex, SnmpVarBindList vblist);
  46. /**
  47. * This callback is invoked when a manager does not respond within the
  48. * specified timeout value to the SNMP inform request. The number of tries have also
  49. * been exhausted.
  50. * @param request The <CODE>SnmpInformRequest</CODE> associated with this callback.
  51. */
  52. public abstract void processSnmpPollTimeout(SnmpInformRequest request);
  53. /**
  54. * This callback is invoked when any form of internal error occurs.
  55. * @param request The <CODE>SnmpInformRequest</CODE> associated with this callback.
  56. * @param errmsg The <CODE>String</CODE> describing the internal error.
  57. */
  58. public abstract void processSnmpInternalError(SnmpInformRequest request, String errmsg);
  59. }