Class: sun.management.ManagementFactory
- public class ManagementFactory
ManagementFactory provides static factory methods to create
instances of the management interface.
Methods
-
ManagementFactorytop
private ManagementFactory() -
addMBeantop
Registers a Standard MBean or a Dynamic MBean and throws exception if an instance with the same name exists. -
addMBeantop
static private void addMBean(MBeanServer mbs, Object mbean, String mbeanName, boolean ignoreConflicts) -
addMXBeantop
static private void addMXBean(MBeanServer mbs, Object mbean, String mbeanName, NotificationEmitter emitter)Registers an MXBean and throws exception if an instance with the same name exists. This method makes a DynamicMBean out of an MXBean by wrapping it with a StandardMBean (StandardEmitterMBean if the supplied emitter is not null), so it can be registered in an MBeanServer which does not have support for MXBeans. -
addMemoryManagerstop
static synchronized private void addMemoryManagers(MBeanServer mbs) -
addMemoryPoolstop
static synchronized private void addMemoryPools(MBeanServer mbs) -
checkAccesstop
static void checkAccess(Permission p) throws SecurityExceptionCheck that the current context is trusted to perform monitoring or management.If the check fails we throw a SecurityException, otherwise we return normally.
-
checkControlAccesstop
static void checkControlAccess() throws SecurityException -
checkMonitorAccesstop
static void checkMonitorAccess() throws SecurityException -
createGarbageCollectortop
-
createMemoryManagertop
static private MemoryManagerMXBean createMemoryManager(String name) -
createMemoryPooltop
static private MemoryPoolMXBean createMemoryPool(String name, boolean isHeap, long uThreshold, long gcThreshold) -
createPlatformMBeanServertop
public static MBeanServer createPlatformMBeanServer() -
getClassLoadingMXBeantop
public static synchronized ClassLoadingMXBean getClassLoadingMXBean() -
getCompilationMXBeantop
public static synchronized CompilationMXBean getCompilationMXBean() -
getDiagnosticMXBeantop
public static synchronized HotSpotDiagnosticMXBean getDiagnosticMXBean() -
getGarbageCollectorMXBeanstop
public static List<GarbageCollectorMXBean> getGarbageCollectorMXBeans() -
getHotspotClassLoadingMBeantop
public static synchronized HotspotClassLoadingMBean getHotspotClassLoadingMBean()This method is for testing only. -
getHotspotCompilationMBeantop
public static synchronized HotspotCompilationMBean getHotspotCompilationMBean()This method is for testing only. -
getHotspotInternalObjectNametop
static synchronized ObjectName getHotspotInternalObjectName() -
getHotspotMemoryMBeantop
public static synchronized HotspotMemoryMBean getHotspotMemoryMBean()This method is for testing only. -
getHotspotRuntimeMBeantop
public static synchronized HotspotRuntimeMBean getHotspotRuntimeMBean()/** This method is for testing only. -
getHotspotThreadMBeantop
public static synchronized HotspotThreadMBean getHotspotThreadMBean()This method is for testing only. -
getMemoryMXBeantop
public static synchronized MemoryMXBean getMemoryMXBean() -
getMemoryManagerMXBeanstop
public static List<MemoryManagerMXBean> getMemoryManagerMXBeans() -
getMemoryPoolMXBeanstop
public static List<MemoryPoolMXBean> getMemoryPoolMXBeans() -
getOperatingSystemMXBeantop
public static synchronized OperatingSystemMXBean getOperatingSystemMXBean() -
getRuntimeMXBeantop
public static synchronized RuntimeMXBean getRuntimeMXBean() -
getThreadMXBeantop
public static synchronized ThreadMXBean getThreadMXBean() -
isThreadRunningNativetop
public static boolean isThreadRunningNative(int state) -
isThreadSuspendedtop
public static boolean isThreadSuspended(int state) -
registerInternalMBeanstop
static void registerInternalMBeans(MBeanServer mbs) -
toThreadStatetop
-
unregisterInternalMBeanstop
static void unregisterInternalMBeans(MBeanServer mbs) -
unregisterMBeantop
static private void unregisterMBean(MBeanServer mbs, String mbeanName)
Fields
-
HOTSPOT_CLASS_LOADING_MBEAN_NAME
static final private String HOTSPOT_CLASS_LOADING_MBEAN_NAME = "sun.management:type=HotspotClassLoading" -
HOTSPOT_COMPILATION_MBEAN_NAME
static final private String HOTSPOT_COMPILATION_MBEAN_NAME = "sun.management:type=HotspotCompilation" -
HOTSPOT_DIAGNOSTIC_MXBEAN_NAME
static final private String HOTSPOT_DIAGNOSTIC_MXBEAN_NAME = "com.sun.management:type=HotSpotDiagnostic" -
HOTSPOT_INTERNAL_MBEAN_NAME
static final private String HOTSPOT_INTERNAL_MBEAN_NAME = "sun.management:type=HotspotInternal" -
HOTSPOT_MEMORY_MBEAN_NAME
static final private String HOTSPOT_MEMORY_MBEAN_NAME = "sun.management:type=HotspotMemory" -
HOTSPOT_RUNTIME_MBEAN_NAME
static final private String HOTSPOT_RUNTIME_MBEAN_NAME = "sun.management:type=HotspotRuntime" -
HOTSPOT_THREAD_MBEAN_NAME
static final private String HOTSPOT_THREAD_MBEAN_NAME = "sun.management:type=HotspotThreading" -
JMM_THREAD_STATE_FLAG_MASK
static final private int JMM_THREAD_STATE_FLAG_MASK = -1048576 -
JMM_THREAD_STATE_FLAG_NATIVE
static final private int JMM_THREAD_STATE_FLAG_NATIVE = 4194304 -
JMM_THREAD_STATE_FLAG_SUSPENDED
static final private int JMM_THREAD_STATE_FLAG_SUSPENDED = 1048576 -
classMBean
static private ClassLoadingImpl classMBean -
compileMBean
static private CompilationImpl compileMBean -
controlPermission
static private Permission controlPermission -
hsClassMBean
static private HotspotClassLoading hsClassMBean -
hsCompileMBean
static private HotspotCompilation hsCompileMBean -
hsDiagMBean
static private HotSpotDiagnostic hsDiagMBean -
hsInternalObjName
static private ObjectName hsInternalObjName -
hsMemoryMBean
static private HotspotMemory hsMemoryMBean -
hsRuntimeMBean
static private HotspotRuntime hsRuntimeMBean -
hsThreadMBean
static private HotspotThread hsThreadMBean -
jvm
static private VMManagement jvm -
mbeansCreated
static private boolean mbeansCreated -
memoryMBean
static private MemoryImpl memoryMBean -
monitorPermission
static private Permission monitorPermission -
osMBean
static private OperatingSystemImpl osMBean -
runtimeMBean
static private RuntimeImpl runtimeMBean -
threadMBean
static private ThreadImpl threadMBean
