1. /*
  2. * @(#)MemoryManagerMXBean.java 1.10 04/04/20
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.lang.management;
  8. /**
  9. * The management interface for a memory manager.
  10. * A memory manager manages one or more memory pools of the
  11. * Java virtual machine.
  12. *
  13. * <p> A Java virtual machine has one or more memory managers.
  14. * An instance implementing this interface is
  15. * an <a href="ManagementFactory.html#MXBean">MXBean</a>
  16. * that can be obtained by calling
  17. * the {@link ManagementFactory#getMemoryManagerMXBeans} method or
  18. * from the {@link ManagementFactory#getPlatformMBeanServer
  19. * platform <tt>MBeanServer</tt>} method.
  20. *
  21. * <p>The <tt>ObjectName</tt> for uniquely identifying the MXBean for
  22. * a memory manager within an MBeanServer is:
  23. * <blockquote>
  24. * {@link ManagementFactory#MEMORY_MANAGER_MXBEAN_DOMAIN_TYPE
  25. * <tt>java.lang:type=MemoryManager</tt>}<tt>,name=</tt><i>manager's name</i>
  26. * </blockquote>
  27. *
  28. * @see MemoryMXBean
  29. *
  30. * @see <a href="../../../javax/management/package-summary.html">
  31. * JMX Specification.</a>
  32. * @see <a href="package-summary.html#examples">
  33. * Ways to Access MXBeans</a>
  34. *
  35. * @author Mandy Chung
  36. * @version 1.10, 04/20/04
  37. * @since 1.5
  38. */
  39. public interface MemoryManagerMXBean {
  40. /**
  41. * Returns the name representing this memory manager.
  42. *
  43. * @return the name of this memory manager.
  44. */
  45. public String getName();
  46. /**
  47. * Tests if this memory manager is valid in the Java virtual
  48. * machine. A memory manager becomes invalid once the Java virtual
  49. * machine removes it from the memory system.
  50. *
  51. * @return <tt>true</tt> if the memory manager is valid in the
  52. * Java virtual machine;
  53. * <tt>false</tt> otherwise.
  54. */
  55. public boolean isValid();
  56. /**
  57. * Returns the name of memory pools that this memory manager manages.
  58. *
  59. * @return an array of <tt>String</tt> objects, each is
  60. * the name of a memory pool that this memory manager manages.
  61. */
  62. public String[] getMemoryPoolNames();
  63. }