public class ManagementFactory extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CLASS_LOADING_MXBEAN_NAME
The unique
ObjectName string identifier for the virtual
machine's singleton ClassLoadingMXBean. |
static String |
COMPILATION_MXBEAN_NAME
The unique
ObjectName string identifier for the virtual
machine's singleton CompilationMXBean. |
static String |
GARBAGE_COLLECTOR_MXBEAN_DOMAIN_TYPE
The prefix for all
ObjectName strings which represent a
GarbageCollectorMXBean. |
static String |
MEMORY_MANAGER_MXBEAN_DOMAIN_TYPE
The prefix for all
ObjectName strings which represent a
MemoryManagerMXBean. |
static String |
MEMORY_MXBEAN_NAME
The unique
ObjectName string identifier for the virtual
machine's singleton MemoryMXBean. |
static String |
MEMORY_POOL_MXBEAN_DOMAIN_TYPE
The prefix for all
ObjectName strings which represent a
MemoryPoolMXBean. |
static String |
OPERATING_SYSTEM_MXBEAN_NAME
The unique
ObjectName string identifier for the virtual
machine's singleton OperatingSystemMXBean. |
static String |
RUNTIME_MXBEAN_NAME
The unique
ObjectName string identifier for the virtual
machine's singleton RuntimeMXBean. |
static String |
THREAD_MXBEAN_NAME
The unique
ObjectName string identifier for the virtual
machine's singleton ThreadMXBean. |
| Modifier and Type | Method and Description |
|---|---|
static ClassLoadingMXBean |
getClassLoadingMXBean()
Returns the singleton
MXBean for the virtual machine's
class loading system. |
static CompilationMXBean |
getCompilationMXBean()
Returns the singleton
MXBean for the virtual machine's
compilation system if and only if the virtual machine has a
compilation system enabled. |
static List<GarbageCollectorMXBean> |
getGarbageCollectorMXBeans()
Returns a list of all of the instances of
GarbageCollectorMXBean
in this virtual machine. |
static List<MemoryManagerMXBean> |
getMemoryManagerMXBeans()
Returns a list of all of the instances of
MemoryManagerMXBean in
this virtual machine. |
static MemoryMXBean |
getMemoryMXBean()
Returns the singleton
MXBean for the virtual machine's
memory system. |
static List<MemoryPoolMXBean> |
getMemoryPoolMXBeans()
Returns a list of all of the instances of
MemoryPoolMXBean in
this virtual machine. |
static OperatingSystemMXBean |
getOperatingSystemMXBean()
Returns the singleton
MXBean for the operating system
which the virtual machine runs on. |
static Set<Class<? extends PlatformManagedObject>> |
getPlatformManagementInterfaces()
Return the set of all platform
MXBean interface classes. |
static MBeanServer |
getPlatformMBeanServer()
Returns the virtual machine's platform
MBeanServer. |
static <T extends PlatformManagedObject> |
getPlatformMXBean(Class<T> mxbeanInterface)
Returns the platform MXBean implementing
the given
mxbeanInterface which is specified
to have one single instance in the Java virtual machine. |
static <T extends PlatformManagedObject> |
getPlatformMXBean(MBeanServerConnection connection,
Class<T> mxbeanInterface)
Returns the platform MXBean proxy for
mxbeanInterface which is specified to have one single
instance in a Java virtual machine and the proxy will
forward the method calls through the given MBeanServerConnection. |
static <T extends PlatformManagedObject> |
getPlatformMXBeans(Class<T> mxbeanInterface)
Returns a list of all of the platform
MXBean
objects which implement the specified management interface. |
static <T extends PlatformManagedObject> |
getPlatformMXBeans(MBeanServerConnection connection,
Class<T> mxbeanInterface)
Return a list of MXBean proxies that can proxy the
mxbeanInterface
using the specified MBeanServerConnection. |
static RuntimeMXBean |
getRuntimeMXBean()
Returns the singleton
MXBean for the virtual machine's
runtime system. |
static ThreadMXBean |
getThreadMXBean()
Returns the singleton
MXBean for the virtual machine's
threading system. |
static <T> T |
newPlatformMXBeanProxy(MBeanServerConnection connection,
String mxbeanName,
Class<T> mxbeanInterface)
Return a proxy for the named
MXBean. |
public static final String CLASS_LOADING_MXBEAN_NAME
ObjectName string identifier for the virtual
machine's singleton ClassLoadingMXBean.public static final String COMPILATION_MXBEAN_NAME
ObjectName string identifier for the virtual
machine's singleton CompilationMXBean.public static final String GARBAGE_COLLECTOR_MXBEAN_DOMAIN_TYPE
ObjectName strings which represent a
GarbageCollectorMXBean. The unique ObjectName for
a GarbageCollectorMXBean can be formed by adding
",name= collector name " to this constant.public static final String MEMORY_MANAGER_MXBEAN_DOMAIN_TYPE
ObjectName strings which represent a
MemoryManagerMXBean. The unique ObjectName for a
MemoryManagerMXBean can be formed by adding
",name=manager name" to this constant.public static final String MEMORY_MXBEAN_NAME
ObjectName string identifier for the virtual
machine's singleton MemoryMXBean.public static final String MEMORY_POOL_MXBEAN_DOMAIN_TYPE
ObjectName strings which represent a
MemoryPoolMXBean. The unique ObjectName for a
MemoryPoolMXBean can be formed by adding ",name=
memory pool name " to this constant.public static final String OPERATING_SYSTEM_MXBEAN_NAME
ObjectName string identifier for the virtual
machine's singleton OperatingSystemMXBean.public static final String RUNTIME_MXBEAN_NAME
ObjectName string identifier for the virtual
machine's singleton RuntimeMXBean.public static final String THREAD_MXBEAN_NAME
ObjectName string identifier for the virtual
machine's singleton ThreadMXBean.public static ClassLoadingMXBean getClassLoadingMXBean()
MXBean for the virtual machine's
class loading system.ClassLoadingMXBeanpublic static CompilationMXBean getCompilationMXBean()
MXBean for the virtual machine's
compilation system if and only if the virtual machine has a
compilation system enabled. If no compilation exists for this
virtual machine, a null is returned.CompilationMXBean or
null if there is no compilation system for this
virtual machine.public static List<GarbageCollectorMXBean> getGarbageCollectorMXBeans()
GarbageCollectorMXBean
in this virtual machine. Owing to the dynamic nature of this kind of
MXBean, it is possible that instances may be created or
destroyed between the invocation and return of this method.GarbageCollectorMXBeans in
this virtual machine.public static List<MemoryManagerMXBean> getMemoryManagerMXBeans()
MemoryManagerMXBean in
this virtual machine. Owing to the dynamic nature of this kind of
MXBean, it is possible that instances may be created or
destroyed between the invocation and return of this method.
Note that the list of MemoryManagerMXBean instances will
include instances of MemoryManagerMXBean sub-types such as
GarbageCollectorMXBean.
MemoryManagerMXBeans in this
virtual machine.public static MemoryMXBean getMemoryMXBean()
MXBean for the virtual machine's
memory system.MemoryMXBeanpublic static List<MemoryPoolMXBean> getMemoryPoolMXBeans()
MemoryPoolMXBean in
this virtual machine. Owing to the dynamic nature of this kind of
MXBean, it is possible that instances may be created or
destroyed between the invocation and return of this method.MemoryPoolMXBeans in this
virtual machine.public static OperatingSystemMXBean getOperatingSystemMXBean()
MXBean for the operating system
which the virtual machine runs on.OperatingSystemMXBeanpublic static MBeanServer getPlatformMBeanServer()
MBeanServer. This MBeanServer will have
all of the platform MXBeans registered with it including
any dynamic MXBeans (e.g. instances of
GarbageCollectorMXBean that may be unregistered and destroyed at
a later time.
In order to simplify the process of distribution and discovery of managed
beans it is good practice to register all managed beans (in addition to
the platform MXBeans) with this server.
A custom MBeanServer can be created by this method if the
System property javax.management.builder.initial has been
set with the fully qualified name of a subclass of
MBeanServerBuilder.
MBeanServer.SecurityException - if there is a Java security manager in operation and the
caller of this method does not have
"createMBeanServer"
MBeanServerPermission.MBeanServer,
MBeanServerPermissionpublic static RuntimeMXBean getRuntimeMXBean()
MXBean for the virtual machine's
runtime system.RuntimeMXBeanpublic static ThreadMXBean getThreadMXBean()
MXBean for the virtual machine's
threading system.ThreadMXBeanpublic static <T> T newPlatformMXBeanProxy(MBeanServerConnection connection, String mxbeanName, Class<T> mxbeanInterface) throws IOException
MXBean.T - the type of the platform MXBeanconnection - the connection to the servermxbeanName - the name of the MXBeanmxbeanInterface - a management interface for a platform MXBeanMXBean.
All subsequent method invocations on the proxy will be routed
through the supplied MBeanServerConnection object.IOException - if a communication problem
occurs with the MBeanServerConnectionpublic static <T extends PlatformManagedObject> T getPlatformMXBean(Class<T> mxbeanInterface)
mxbeanInterface which is specified
to have one single instance in the Java virtual machine.
This method may return null if the management interface
is not implemented in the Java virtual machine (for example,
a Java virtual machine with no compilation system does not
implement CompilationMXBean);
otherwise, this method is equivalent to calling:
getPlatformMXBeans(mxbeanInterface).get(0);
T - the type of the platform MXBeanmxbeanInterface - a management interface for a platform MXBean
with one single instance in the Java virtual machine if implemented.mxbeanInterface, or null if it does not exist.IllegalArgumentException - if mxbeanInterface
is not a platform management interface or
not a singleton platform MXBean.public static <T extends PlatformManagedObject> List<T> getPlatformMXBeans(Class<T> mxbeanInterface) throws IllegalArgumentException
MXBean
objects which implement the specified management interface.T - the type of the platform MXBeansmxbeanInterface - a management interface for the platform MXBeansmxbeanInterfaceIllegalArgumentException - if mxbeanInterface
is not a platform management interfacepublic static <T extends PlatformManagedObject> T getPlatformMXBean(MBeanServerConnection connection, Class<T> mxbeanInterface) throws IOException
mxbeanInterface which is specified to have one single
instance in a Java virtual machine and the proxy will
forward the method calls through the given MBeanServerConnection.
This method may return null if the management interface
is not implemented in the Java virtual machine being monitored
(for example, a Java virtual machine with no compilation system
does not implement CompilationMXBean);
otherwise, this method is equivalent to calling:
getPlatformMXBeans(connection, mxbeanInterface).get(0);
T - the type of the platform MXBeansconnection - the MBeanServerConnection to forward to.mxbeanInterface - a management interface for a platform
MXBean with one single instance in the Java virtual machine
being monitored, if implemented.mxbeanInterface
through the given MBeanServerConnection,
or null if not exist.IllegalArgumentException - if mxbeanInterface
is not a platform management interface or
not a singleton platform MXBean.IOException - if a communication problem
occurred when accessing the MBeanServerConnection.newPlatformMXBeanProxy(javax.management.MBeanServerConnection, java.lang.String, java.lang.Class<T>)public static <T extends PlatformManagedObject> List<T> getPlatformMXBeans(MBeanServerConnection connection, Class<T> mxbeanInterface) throws IllegalArgumentException, IOException
mxbeanInterface
using the specified MBeanServerConnection.T - the type of the platform MXBeansconnection - the MBeanServerConnection to forward tomxbeanInterface - a management interface for the platform MXBeansmxbeanInterface
using the specified MBeanServerConnection.IllegalArgumentException - if mxbeanInterface is not a platform management interfaceIOException - if a communication problem occurs with the MBeanServerConnectionpublic static Set<Class<? extends PlatformManagedObject>> getPlatformManagementInterfaces()
MXBean interface classes.MXBean interface classes.Eclipse OpenJ9 website.
To raise a bug report or suggest an improvement create an Eclipse OpenJ9 issue.
Copyright © 1993, 2025 IBM Corp. and others.
DRAFT internal-b00