1. /*
  2. * @(#)file SnmpSubSystem.java
  3. * @(#)author Sun Microsystems, Inc.
  4. * @(#)version 1.15
  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.internal;
  12. import com.sun.jmx.snmp.SnmpEngine;
  13. import com.sun.jmx.snmp.SnmpUnknownModelException;
  14. import java.util.Hashtable;
  15. /**
  16. * SNMP sub system interface. To allow engine framework integration, a sub system must implement this interface. A sub system is a model manager. Every model is identified by an ID. A sub system can retrieve a previously registered model using this ID.
  17. * <P> Every sub system is associated to its SNMP engine.
  18. * <p><b>This API is a Sun Microsystems internal API and is subject
  19. * to change without notice.</b></p>
  20. */
  21. public interface SnmpSubSystem {
  22. /**
  23. * Returns the associated engine.
  24. * @return The engine.
  25. */
  26. public SnmpEngine getEngine();
  27. /**
  28. * Adds a model to this sub system.
  29. * @param id The model ID.
  30. * @param model The model to add.
  31. */
  32. public void addModel(int id, SnmpModel model);
  33. /**
  34. * Removes a model from this sub system.
  35. * @param id The model ID to remove.
  36. * @return The removed model.
  37. */
  38. public SnmpModel removeModel(int id) throws SnmpUnknownModelException;
  39. /**
  40. * Gets a model from this sub system.
  41. * @param id The model ID to get.
  42. * @return The model.
  43. */
  44. public SnmpModel getModel(int id) throws SnmpUnknownModelException;
  45. /**
  46. * Returns the set of model Ids that have been registered within the sub system.
  47. */
  48. public int[] getModelIds();
  49. /**
  50. * Returns the set of model names that have been registered within the sub system.
  51. */
  52. public String[] getModelNames();
  53. }