| package | Java SE 6 |
| Details
Provides the management interface for monitoring and management of the
Java virtual machine as well as the operating system on which the
Java virtual machine is running. It allows both local and remote
monitoring and management of the running Java virtual machine.
Platform MXBeansThis package defines the management interface of the following components:
A platform MXBean is a managed bean that defines the management interface for one component for the platform and is specified in the ManagementFactory class. An application can monitor the instrumentation of the Java virtual machine and manage certain characteristics in the following ways:
ManagementFactoryThejava.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
to allow an application to access the MXBeans directly.
A platform MBeanServer can be accessed with the
InteroperabilityA management application and a platform MBeanServer of a running virtual machine can interoperate without requiring classes used by the platform MXBean interfaces. The data types being transmitted between the JMX connector server and the connector client are JMXopen types and
this allows interoperation across versions.
A data type used by the MXBean interfaces are mapped to
an open type when being accessed via MBeanServer interface.
The data type mapping is specified in the
Ways to Access MXBeansThere are three different ways to access the management interfaces.
Platform ExtensionA Java virtual machine implementation may add its platform extension to the management interface by defining platform-dependent interfaces that extend the standard management interfaces to include platform-specific metrics and management operations. The static factory methods in the ManagementFactory class will return the MBeans with the platform extension.It is recommended to name the platform-specific attributes with a vendor-specific prefix such as the vendor's name to avoid collisions of the attribute name between the future extension to the standard management interface and the platform extension. If the future extension to the standard management interface defines a new attribute for a management interface and the attribute name is happened to be same as some vendor-specific attribute's name, the applications accessing that vendor-specific attribute would have to be modified to cope with versioning and compatibility issues. Below is an example showing how to access a platform-specific attribute from Sun's implementation of the RuntimeMXBean. 1) Direct access to the Sun-specific MXBean interface
2) Access the Sun-specific MXBean interface via MBeanServer
Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a {@link java.lang.NullPointerException}NullPointerException to be thrown. The java.lang.management API is thread-safe.
|
| About DocWeb · Bundles · Export · Export All | Top 10 · Statistics · Login |
| About Sun · Contact · Privacy · Terms of Use · Trademarks | Java SE 6 · Copyright © 1994-2009 Sun Microsystems, Inc.All rights reserved. Use is subject to license terms |
![]() |
![]() |
|