public class ManagementFactory
extends java.lang.Object
The factory for retrieving all managed objects for the JVM as well as the JVM’s MBean server.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COMPILATION_MXBEAN_NAME
|
static java.lang.String |
CONNECTED_COMPILER_CLIENT_MXBEAN_NAME
|
static java.lang.String |
GARBAGE_COLLECTOR_MXBEAN_DOMAIN_TYPE
|
static java.lang.String |
MEMORY_MANAGER_MXBEAN_DOMAIN_TYPE
|
static java.lang.String |
MEMORY_MXBEAN_NAME
|
static java.lang.String |
MEMORY_POOL_MXBEAN_DOMAIN_TYPE
|
static java.lang.String |
PERSISTENT_PROFILE_MXBEAN_NAME
|
static java.lang.String |
TIME_MXBEAN_NAME
|
| Modifier and Type | Method and Description |
|---|---|
static CompilationMXBean |
getCompilationMXBean()
Returns the singleton
MXBean for the virtual machine’s
compilation system. |
static java.lang.Object |
getConnectedCompilerClientMXBean()
Returns the singleton
MXBean for the virtual machine’s
persistent profile system. |
static java.util.List<GarbageCollectorMXBean> |
getGarbageCollectorMXBeans()
Returns a list of all of the instances of
GarbageCollectorMXBean
in this virtual machine. |
static java.util.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 java.util.List<MemoryPoolMXBean> |
getMemoryPoolMXBeans()
Returns a list of all of the instances of
MemoryPoolMXBean in
this virtual machine. |
static PersistentProfileMXBean |
getPersistentProfileMXBean()
Returns the singleton
MXBean for the virtual machine’s
persistent profile system. |
static javax.management.MBeanServer |
getPlatformMBeanServer()
Returns a reference to the virtual machine’s platform
MBeanServer. |
static TimeMXBean |
getTimeMXBean()
Returns the singleton
MXBean for the virtual machine’s
time system. |
static <T> T |
newPlatformMXBeanProxy(javax.management.MBeanServerConnection connection,
java.lang.String mxbeanName,
java.lang.Class<T> mxbeanInterface)
Create a custom proxy object for the named
MXBean. |
public static final java.lang.String COMPILATION_MXBEAN_NAME
The String value of the ObjectName for
CompilationMXBean.
public static final java.lang.String CONNECTED_COMPILER_CLIENT_MXBEAN_NAME
The String value of the ObjectName for
ConnectedCompilerClientMXBean.
public static final java.lang.String GARBAGE_COLLECTOR_MXBEAN_DOMAIN_TYPE
The String value of the ObjectName for
GarbageCollectorMXBean.
public static final java.lang.String MEMORY_MANAGER_MXBEAN_DOMAIN_TYPE
The String value of the ObjectName for
MemoryManagerMXBean.
public static final java.lang.String MEMORY_MXBEAN_NAME
The String value of the ObjectName for MemoryMXBean.
public static final java.lang.String MEMORY_POOL_MXBEAN_DOMAIN_TYPE
The String value of the ObjectName for MemoryPoolMXBean.
public static final java.lang.String PERSISTENT_PROFILE_MXBEAN_NAME
The String value of the ObjectName for
PersistentProfileMXBean.
public static final java.lang.String TIME_MXBEAN_NAME
The String value of the ObjectName for TimeMXBean.
public static CompilationMXBean getCompilationMXBean()
MXBean for the virtual machine’s
compilation system.CompilationMXBeanpublic static java.lang.Object getConnectedCompilerClientMXBean()
MXBean for the virtual machine’s
persistent profile system.ConnectedCompilerClientMXBeanpublic static java.util.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.GarbageCollectorMXBean instances
in this virtual machine.public static java.util.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
the GarbageCollectorMXBean.
List of all known MemoryManagerMXBean
instances in this virtual machine.public static MemoryMXBean getMemoryMXBean()
MXBean for the virtual machine’s
memory system.MemoryMXBeanpublic static java.util.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.MemoryPoolMXBean instances in this
virtual machine.public static PersistentProfileMXBean getPersistentProfileMXBean()
MXBean for the virtual machine’s
persistent profile system.PersistentProfileMXBeanpublic static javax.management.MBeanServer getPlatformMBeanServer()
MBeanServer. This MBeanServer will have
all of the platform MXBean instances registered with it including
any dynamic MXBean s (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.java.lang.SecurityException - if there is a Java security manager in operation and the
caller of this method does not have
"createMBeanServer"
MBeanServerPermission.MBeanServer,
MBeanServerPermissionpublic static TimeMXBean getTimeMXBean()
MXBean for the virtual machine’s
time system.TimeMXBeanpublic static <T> T newPlatformMXBeanProxy(javax.management.MBeanServerConnection connection,
java.lang.String mxbeanName,
java.lang.Class<T> mxbeanInterface)
throws java.io.IOException
Create a custom proxy object for the named MXBean.
connection - MBeanServerConnection for the custom proxy object.mxbeanName - name of the MXBean.mxbeanInterface - MXBean class.MXBean.
All subsequent method invocations on the proxy will be routed
through the supplied MBeanServerConnection object.java.io.IOException Submit a bug or feature request
Copyright © 2015-2017, Azul Systems, Inc. All rights reserved.
Azul Systems and Zing are registered trademarks of Azul Systems, Inc.