This class provides the main entry point into
the java.lang.management API. The static factory
methods provide a convenient way to obtain instances of the various
MXBean interfaces for the currently running Java virtual machine. The returned
instances can then be queried to monitor memory usage, class loading,
and other details of virtual machine performance.
To obtain an MXBean for a Java virtual machine running in another
process, use the newPlatformMXBeanProxy(
) method, specifying a
javax.management.MBeanServerConnection as well as
the name and type of the desired MXBean. The constant fields of this
class define the names of the available beans. Note that the
javax.management package is beyond the scope of
this quick reference.
public class
ManagementFactory {
// No Constructor
// Public Constants
public static final String
CLASS_LOADING_MXBEAN_NAME ; ="java.lang:type=ClassLoading"
public static final String
COMPILATION_MXBEAN_NAME ; ="java.lang:type=Compilation"
public static final String
GARBAGE_COLLECTOR_MXBEAN_DOMAIN_TYPE ; ="java.lang:type=GarbageCollector"
public static final String
MEMORY_MANAGER_MXBEAN_DOMAIN_TYPE ; ="java.lang:type=MemoryManager"
public static final String
MEMORY_MXBEAN_NAME ; ="java.lang:type=Memory"
public static final String
MEMORY_POOL_MXBEAN_DOMAIN_TYPE ; ="java.lang:type=MemoryPool"
public static final String
OPERATING_SYSTEM_MXBEAN_NAME ; ="java.lang:type=OperatingSystem"
public static final String
RUNTIME_MXBEAN_NAME ; ="java.lang:type=Runtime"
public static final String
THREAD_MXBEAN_NAME ; ="java.lang:type=Threading"
// Public Class Methods
public static ClassLoadingMXBean
getClassLoadingMXBean ( );
public static CompilationMXBean
getCompilationMXBean ( );
public static java.util.List<GarbageCollectorMXBean>
getGarbageCollectorMXBeans ( );
public static java.util.List<MemoryManagerMXBean>
getMemoryManagerMXBeans ( );
public static MemoryMXBean
getMemoryMXBean ( );
public static java.util.List<MemoryPoolMXBean>
getMemoryPoolMXBeans ( );
public static OperatingSystemMXBean
getOperatingSystemMXBean ( );
public static javax.management.MBeanServer
getPlatformMBeanServer ( ); synchronized
public static RuntimeMXBean
getRuntimeMXBean ( );
public static ThreadMXBean
getThreadMXBean ( );
public static <T> T
newPlatformMXBeanProxy (javax.management.
MBeanServerConnection
connection , String
mxbeanName , Class<T>
mxbeanInterface )
throws java.io.IOException;
}