src/share/classes/java/lang/management/package.html

Print this page

        

*** 29,49 **** Provides the management interfaces for monitoring and management of the Java virtual machine and other components in the Java runtime. It allows both local and remote monitoring and management of the running Java virtual machine. - <p> <h4><a name="MXBean">Platform MXBean</a></h4> <p> A platform MXBean is a <i>managed bean</i> that conforms to the <a href="../../../javax/management/package-summary.html">JMX</a> Instrumentation Specification and only uses a set of basic data types. Each platform MXBean is a {@link java.lang.management.PlatformManagedObject} with a unique {@linkplain java.lang.management.PlatformManagedObject#getObjectName name}. - <p> <h4>ManagementFactory</h4> <p>The {@link java.lang.management.ManagementFactory} class is the management factory class for the Java platform. This class provides a set of static factory methods to obtain the MXBeans for the Java platform --- 29,47 ----
*** 78,88 **** <p>An application can monitor the instrumentation of the Java virtual machine and the runtime in the following ways: <p> <b>1. Direct access to an MXBean interface</b> - <p> <ul> <li>Get an MXBean instance locally in the running Java virtual machine: <pre> RuntimeMXBean mxbean = ManagementFactory.getRuntimeMXBean(); --- 76,85 ----
*** 98,108 **** RuntimeMXBean mxbean = ManagementFactory.getPlatformMXBean(RuntimeMXBean.class); // Get the standard attribute "VmVendor" String vendor = mxbean.getVmVendor(); </pre> - <p> </li> <li>Construct an MXBean proxy instance that forwards the method calls to a given MBeanServer: <pre> MBeanServerConnection mbs; --- 95,104 ----
*** 130,151 **** RuntimeMXBean.class); </pre> </li> </ul> <p> ! <b>2. Indirect access to an MXBean interface via MBeanServer</b><p> <ul> <li>Go through the {@link java.lang.management.ManagementFactory#getPlatformMBeanServer platform MBeanServer} to access MXBeans locally or a specific {@code MBeanServerConnection} to access MXBeans remotely. The attributes and operations of an MXBean use only <em>JMX open types</em> which include basic data types, {@link javax.management.openmbean.CompositeData CompositeData}, and {@link javax.management.openmbean.TabularData TabularData} ! defined in {@link javax.management.openmbean.OpenType OpenType}.<p> <pre> MBeanServerConnection mbs; // Connect to a running JVM (or itself) and get MBeanServerConnection // that has the JVM MXBeans registered in it --- 126,147 ---- RuntimeMXBean.class); </pre> </li> </ul> <p> ! <b>2. Indirect access to an MXBean interface via MBeanServer</b> <ul> <li>Go through the {@link java.lang.management.ManagementFactory#getPlatformMBeanServer platform MBeanServer} to access MXBeans locally or a specific {@code MBeanServerConnection} to access MXBeans remotely. The attributes and operations of an MXBean use only <em>JMX open types</em> which include basic data types, {@link javax.management.openmbean.CompositeData CompositeData}, and {@link javax.management.openmbean.TabularData TabularData} ! defined in {@link javax.management.openmbean.OpenType OpenType}. <pre> MBeanServerConnection mbs; // Connect to a running JVM (or itself) and get MBeanServerConnection // that has the JVM MXBeans registered in it