diff --git a/jdk/src/java.management/share/classes/java/lang/management/LockInfo.java b/jdk/src/java.management/share/classes/java/lang/management/LockInfo.java index 108b3c9ae59..ada956a1694 100644 --- a/jdk/src/java.management/share/classes/java/lang/management/LockInfo.java +++ b/jdk/src/java.management/share/classes/java/lang/management/LockInfo.java @@ -104,23 +104,25 @@ public class LockInfo { * Returns a {@code LockInfo} object represented by the * given {@code CompositeData}. * The given {@code CompositeData} must contain the following attributes: - *
- * + *
* + * * - * - * + * + * * + * + * * - * + * * * * - * + * * * + * *
The attributes and the types the given CompositeData contains
Attribute NameTypeAttribute NameType
classNameclassName{@code java.lang.String}
identityHashCodeidentityHashCode{@code java.lang.Integer}
- *
* * @param cd {@code CompositeData} representing a {@code LockInfo} * diff --git a/jdk/src/java.management/share/classes/java/lang/management/ManagementFactory.java b/jdk/src/java.management/share/classes/java/lang/management/ManagementFactory.java index 53adeb7d812..e41cf94ed9b 100644 --- a/jdk/src/java.management/share/classes/java/lang/management/ManagementFactory.java +++ b/jdk/src/java.management/share/classes/java/lang/management/ManagementFactory.java @@ -140,96 +140,102 @@ import sun.management.spi.PlatformMBeanProvider.PlatformComponent; * A Java virtual machine has a single instance of the following management * interfaces: * - *
- * + *
* + * * - * - * + * + * * + * + * * - * + * * * * - * + * * * * - * + * * * * - * + * * * * - * + * * * * - * + * * * + * *
The list of Management Interfaces and their single instances
Management InterfaceObjectNameManagement InterfaceObjectName
{@link ClassLoadingMXBean} {@link ClassLoadingMXBean} {@link #CLASS_LOADING_MXBEAN_NAME * java.lang:type=ClassLoading}
{@link MemoryMXBean} {@link MemoryMXBean} {@link #MEMORY_MXBEAN_NAME * java.lang:type=Memory}
{@link ThreadMXBean} {@link ThreadMXBean} {@link #THREAD_MXBEAN_NAME * java.lang:type=Threading}
{@link RuntimeMXBean} {@link RuntimeMXBean} {@link #RUNTIME_MXBEAN_NAME * java.lang:type=Runtime}
{@link OperatingSystemMXBean} {@link OperatingSystemMXBean} {@link #OPERATING_SYSTEM_MXBEAN_NAME * java.lang:type=OperatingSystem}
{@link PlatformLoggingMXBean} {@link PlatformLoggingMXBean} {@link java.util.logging.LogManager#LOGGING_MXBEAN_NAME * java.util.logging:type=Logging}
- *
* *

* A Java virtual machine has zero or a single instance of * the following management interfaces. * - *

- * + *
* + * * - * - * + * + * * + * + * * - * + * * * + * *
The list of Management Interfaces and their single instances
Management InterfaceObjectNameManagement InterfaceObjectName
{@link CompilationMXBean} {@link CompilationMXBean} {@link #COMPILATION_MXBEAN_NAME * java.lang:type=Compilation}
- *
* *

* A Java virtual machine may have one or more instances of the following * management interfaces. - *

- * + *
* + * * - * - * + * + * * + * + * * - * + * * * * - * + * * * * - * + * * * * - * + * * * + * *
The list of Management Interfaces and their single instances
Management InterfaceObjectNameManagement InterfaceObjectName
{@link GarbageCollectorMXBean} {@link GarbageCollectorMXBean} {@link #GARBAGE_COLLECTOR_MXBEAN_DOMAIN_TYPE * java.lang:type=GarbageCollector}{@code ,name=}collector's name
{@link MemoryManagerMXBean} {@link MemoryManagerMXBean} {@link #MEMORY_MANAGER_MXBEAN_DOMAIN_TYPE * java.lang:type=MemoryManager}{@code ,name=}manager's name
{@link MemoryPoolMXBean} {@link MemoryPoolMXBean} {@link #MEMORY_POOL_MXBEAN_DOMAIN_TYPE * java.lang:type=MemoryPool}{@code ,name=}pool's name
{@link BufferPoolMXBean} {@link BufferPoolMXBean} {@code java.nio:type=BufferPool,name=}pool name
- *
* * @see * JMX Specification diff --git a/jdk/src/java.management/share/classes/java/lang/management/ManagementPermission.java b/jdk/src/java.management/share/classes/java/lang/management/ManagementPermission.java index d32155e1681..525cc350ac4 100644 --- a/jdk/src/java.management/share/classes/java/lang/management/ManagementPermission.java +++ b/jdk/src/java.management/share/classes/java/lang/management/ManagementPermission.java @@ -36,14 +36,17 @@ package java.lang.management; * * * + * * - * - * - * + * + * + * * + * + * * * - * + * * * * - * + * * * * + * *
Table shows permission target name, what the permission allows, and associated risks
Permission Target NameWhat the Permission AllowsRisks of Allowing this PermissionPermission Target NameWhat the Permission AllowsRisks of Allowing this Permission
controlcontrolAbility to control the runtime characteristics of the Java virtual * machine, for example, enabling and disabling the verbose output for * the class loading or memory system, setting the threshold of a memory @@ -59,7 +62,7 @@ package java.lang.management; *
monitormonitorAbility to retrieve runtime information about * the Java virtual machine such as thread * stack trace, a list of all loaded class names, and input arguments @@ -68,6 +71,7 @@ package java.lang.management; * uncover vulnerabilities.
* *

diff --git a/jdk/src/java.management/share/classes/java/lang/management/MemoryNotificationInfo.java b/jdk/src/java.management/share/classes/java/lang/management/MemoryNotificationInfo.java index 881bdcf90b1..4e3b81a2a87 100644 --- a/jdk/src/java.management/share/classes/java/lang/management/MemoryNotificationInfo.java +++ b/jdk/src/java.management/share/classes/java/lang/management/MemoryNotificationInfo.java @@ -211,27 +211,29 @@ public class MemoryNotificationInfo { * given {@code CompositeData}. * The given {@code CompositeData} must contain * the following attributes: - *

- * + *
* + * * - * - * + * + * * + * + * * - * + * * * * - * + * * * * - * + * * * + * *
The attributes and the types the given CompositeData contains
Attribute NameTypeAttribute NameType
poolNamepoolName{@code java.lang.String}
usageusage{@code javax.management.openmbean.CompositeData}
countcount{@code java.lang.Long}
- *
* * @param cd {@code CompositeData} representing a * {@code MemoryNotificationInfo} diff --git a/jdk/src/java.management/share/classes/java/lang/management/MemoryUsage.java b/jdk/src/java.management/share/classes/java/lang/management/MemoryUsage.java index 66c78d93042..c79fc654a49 100644 --- a/jdk/src/java.management/share/classes/java/lang/management/MemoryUsage.java +++ b/jdk/src/java.management/share/classes/java/lang/management/MemoryUsage.java @@ -36,10 +36,14 @@ import sun.management.MemoryUsageCompositeData; * the heap or non-heap memory of the Java virtual machine as a whole. * *

A {@code MemoryUsage} object contains four values: - * + *
* + * + * + * + * * - * + * * * * - * + * * * * - * + * * * * - * + * * * + * *
Describes the MemoryUsage object content
ValueDescription
{@code init} {@code init} represents the initial amount of memory (in bytes) that * the Java virtual machine requests from the operating system * for memory management during startup. The Java virtual machine @@ -49,12 +53,12 @@ import sun.management.MemoryUsageCompositeData; *
{@code used} {@code used} represents the amount of memory currently used (in bytes). *
{@code committed} {@code committed} represents the amount of memory (in bytes) that is * guaranteed to be available for use by the Java virtual machine. * The amount of committed memory may change over time (increase @@ -65,7 +69,7 @@ import sun.management.MemoryUsageCompositeData; *
{@code max} {@code max} represents the maximum amount of memory (in bytes) * that can be used for memory management. Its value may be undefined. * The maximum amount of memory may change over time if defined. @@ -77,6 +81,7 @@ import sun.management.MemoryUsageCompositeData; * when the system is low on virtual memory). *
* * Below is a picture showing an example of a memory pool: @@ -252,31 +257,33 @@ public class MemoryUsage { * given {@code CompositeData}. The given {@code CompositeData} * must contain the following attributes: * - *

- * + *
* + * * - * - * + * + * * + * + * * - * + * * * * - * + * * * * - * + * * * * - * + * * * + * *
The attributes and the types the given CompositeData contains
Attribute NameTypeAttribute NameType
initinit{@code java.lang.Long}
usedused{@code java.lang.Long}
committedcommitted{@code java.lang.Long}
maxmax{@code java.lang.Long}
- *
* * @param cd {@code CompositeData} representing a {@code MemoryUsage} * diff --git a/jdk/src/java.management/share/classes/java/lang/management/MonitorInfo.java b/jdk/src/java.management/share/classes/java/lang/management/MonitorInfo.java index 81b66afd2b4..c57c21a51ec 100644 --- a/jdk/src/java.management/share/classes/java/lang/management/MonitorInfo.java +++ b/jdk/src/java.management/share/classes/java/lang/management/MonitorInfo.java @@ -105,15 +105,17 @@ public class MonitorInfo extends LockInfo { * as well as the attributes specified in the * * mapped type for the {@link LockInfo} class: - *
- * + *
* + * * - * - * + * + * * + * + * * - * + * * * * - * + * * * + * *
The attributes and their types the given CompositeData contains
Attribute NameTypeAttribute NameType
lockedStackFramelockedStackFrameCompositeData as specified in the * stackTrace * attribute defined in the {@link ThreadInfo#from @@ -121,11 +123,11 @@ public class MonitorInfo extends LockInfo { *
lockedStackDepthlockedStackDepth{@code java.lang.Integer}
- *
* * @param cd {@code CompositeData} representing a {@code MonitorInfo} * diff --git a/jdk/src/java.management/share/classes/java/lang/management/RuntimeMXBean.java b/jdk/src/java.management/share/classes/java/lang/management/RuntimeMXBean.java index def09b4a00b..495b41f43db 100644 --- a/jdk/src/java.management/share/classes/java/lang/management/RuntimeMXBean.java +++ b/jdk/src/java.management/share/classes/java/lang/management/RuntimeMXBean.java @@ -311,23 +311,25 @@ public interface RuntimeMXBean extends PlatformManagedObject { * The mapped type of {@code Map} is * {@link javax.management.openmbean.TabularData TabularData} * with two items in each row as follows: - *
- * + *
* + * * - * - * + * + * * - * - * + * + * + * + * * * * - * + * * * + * *
Name and Type for each item
Item NameItem TypeItem NameItem Type
{@code key}
{@code key}{@code String}
{@code value}{@code value}{@code String}
- *
* * @return a map of names and values of all system properties. * diff --git a/jdk/src/java.management/share/classes/java/lang/management/ThreadInfo.java b/jdk/src/java.management/share/classes/java/lang/management/ThreadInfo.java index c3838572cfe..3799baf1a1d 100644 --- a/jdk/src/java.management/share/classes/java/lang/management/ThreadInfo.java +++ b/jdk/src/java.management/share/classes/java/lang/management/ThreadInfo.java @@ -694,51 +694,53 @@ public class ThreadInfo { * given {@code CompositeData}. * The given {@code CompositeData} must contain the following attributes * unless otherwise specified below: - *
- * + *
* + * * - * - * + * + * * + * + * * - * + * * * * - * + * * * * - * + * * * * - * + * * * * - * + * * * * - * + * * * * - * + * * * * - * + * * * * - * + * * * * - * + * * * * - * + * * * * - * + * * * * - * + * * * * - * + * * * * - * + * * * * - * + * * * * - * + * * * * - * + * * * + * *
The attributes and their types the given CompositeData contains
Attribute NameTypeAttribute NameType
threadIdthreadId{@code java.lang.Long}
threadNamethreadName{@code java.lang.String}
threadStatethreadState{@code java.lang.String}
suspendedsuspended{@code java.lang.Boolean}
inNativeinNative{@code java.lang.Boolean}
blockedCountblockedCount{@code java.lang.Long}
blockedTimeblockedTime{@code java.lang.Long}
waitedCountwaitedCount{@code java.lang.Long}
waitedTimewaitedTime{@code java.lang.Long}
lockInfolockInfo{@code javax.management.openmbean.CompositeData} * - the mapped type for {@link LockInfo} as specified in the * {@link LockInfo#from} method. @@ -748,64 +750,66 @@ public class ThreadInfo { * the value of the {@code lockName} attribute.
lockNamelockName{@code java.lang.String}
lockOwnerIdlockOwnerId{@code java.lang.Long}
lockOwnerNamelockOwnerName{@code java.lang.String}
stackTracestackTrace{@code javax.management.openmbean.CompositeData[]} *

* Each element is a {@code CompositeData} representing * StackTraceElement containing the following attributes: - *

- * + *
* + * * - * - * + * + * * + * + * * - * + * * * * - * + * * * * - * + * * * * - * + * * * * - * + * * * * - * + * * * * - * + * * * + * *
The attributes and their types the given CompositeData contains
Attribute NameTypeAttribute NameType
moduleNamemoduleName{@code java.lang.String}
moduleVersionmoduleVersion{@code java.lang.String}
classNameclassName{@code java.lang.String}
methodNamemethodName{@code java.lang.String}
fileNamefileName{@code java.lang.String}
lineNumberlineNumber{@code java.lang.Integer}
nativeMethodnativeMethod{@code java.lang.Boolean}
- *
*
lockedMonitorslockedMonitors{@code javax.management.openmbean.CompositeData[]} * whose element type is the mapped type for * {@link MonitorInfo} as specified in the @@ -815,7 +819,7 @@ public class ThreadInfo { * this attribute will be set to an empty array.
lockedSynchronizerslockedSynchronizers{@code javax.management.openmbean.CompositeData[]} * whose element type is the mapped type for * {@link LockInfo} as specified in the {@link LockInfo#from} method. @@ -824,15 +828,15 @@ public class ThreadInfo { * this attribute will be set to an empty array.
daemondaemon{@code java.lang.Boolean}
prioritypriority{@code java.lang.Integer}
- *
* * @param cd {@code CompositeData} representing a {@code ThreadInfo} * diff --git a/jdk/src/java.management/share/classes/javax/management/Descriptor.java b/jdk/src/java.management/share/classes/javax/management/Descriptor.java index 2dc41fc3a8d..439924bfd91 100644 --- a/jdk/src/java.management/share/classes/javax/management/Descriptor.java +++ b/jdk/src/java.management/share/classes/javax/management/Descriptor.java @@ -98,16 +98,21 @@ import javax.management.openmbean.OpenType; * * * + * + * + * + * + * + * * - * - * - * + * + * * * * * - * + * * * * - * + * * * * - * + * * * * * - * + * * * * * - * + * * * * + * * * * * - * + * * * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * * + * * * * * - * + * * * * * - * + * * * * * - * + * * * * + * * * * + * * * * * - * + * * * * - * + * * * * * + * *
Descriptor Fields
NameTypeUsed inMeaning
NameTypeUsed inMeaning
defaultValueObject
defaultValueObjectMBeanAttributeInfo
MBeanParameterInfo
Default value for an attribute or parameter. See * {@link javax.management.openmbean}.
deprecatedStringAny
deprecatedStringAnyAn indication that this element of the information model is no * longer recommended for use. A set of MBeans defined by an @@ -118,8 +123,8 @@ import javax.management.openmbean.OpenType; * deprecation, for example {@code "1.3 Replaced by the Capacity * attribute"}.
descriptionResource
- * BundleBaseName
StringAny
descriptionResource
+ * BundleBaseName
StringAnyThe base name for the {@link ResourceBundle} in which the key given in * the {@code descriptionResourceKey} field can be found, for example @@ -127,7 +132,7 @@ import javax.management.openmbean.OpenType; * field is defined by this specification but the field is not set or * used by the JMX API itself.
descriptionResourceKey
descriptionResourceKeyStringAnyA resource key for the description of this element. In @@ -136,7 +141,7 @@ import javax.management.openmbean.OpenType; * The meaning of this field is defined by this specification but the * field is not set or used by the JMX API itself.
enabledString
enabledStringMBeanAttributeInfo
MBeanNotificationInfo
MBeanOperationInfo
The string {@code "true"} or {@code "false"} according as this @@ -148,7 +153,7 @@ import javax.management.openmbean.OpenType; * might be disabled if it cannot currently be emitted but could be in * other circumstances.
exceptionsString[]
exceptionsString[]MBeanAttributeInfo, MBeanConstructorInfo, MBeanOperationInfoThe class names of the exceptions that can be thrown when invoking a @@ -158,7 +163,7 @@ import javax.management.openmbean.OpenType; * setting an attribute are specified by the field * {@code setExceptions}. * - *
immutableInfoString
immutableInfoStringMBeanInfoThe string {@code "true"} or {@code "false"} according as this @@ -171,7 +176,7 @@ import javax.management.openmbean.OpenType; * href="MBeanInfo.html#info-changed">{@code "jmx.mbean.info.changed"} * notification.
infoTimeoutString
Long
MBeanInfo
infoTimeoutString
Long
MBeanInfoThe time in milli-seconds that the MBeanInfo can reasonably be * expected to be unchanged. The value can be a {@code Long} or a @@ -184,7 +189,7 @@ import javax.management.openmbean.OpenType; * href="MBeanInfo.html#info-changed">{@code "jmx.mbean.info.changed"} in * its {@link MBeanNotificationInfo} array.
interfaceClassName
interfaceClassNameStringMBeanInfoThe Java interface name for a Standard MBean or MXBean, as @@ -193,26 +198,26 @@ import javax.management.openmbean.OpenType; * StandardMBean} class will have this field in its MBeanInfo * Descriptor.
legalValues
legalValues{@literal Set}MBeanAttributeInfo
MBeanParameterInfo
Legal values for an attribute or parameter. See * {@link javax.management.openmbean}.
locale
localeStringAnyThe {@linkplain Locale locale} of the description in this * {@code MBeanInfo}, {@code MBeanAttributeInfo}, etc, as returned * by {@link Locale#toString()}.
maxValueObject
maxValueObjectMBeanAttributeInfo
MBeanParameterInfo
Maximum legal value for an attribute or parameter. See * {@link javax.management.openmbean}.
metricTypeString
metricTypeStringMBeanAttributeInfo
MBeanOperationInfo
The type of a metric, one of the strings "counter" or "gauge". @@ -225,13 +230,13 @@ import javax.management.openmbean.OpenType; * that can increase or decrease. Examples might be the number of * open connections or a cache hit rate or a temperature reading. * - *
minValueObject
minValueObjectMBeanAttributeInfo
MBeanParameterInfo
Minimum legal value for an attribute or parameter. See * {@link javax.management.openmbean}.
mxbeanString
mxbeanStringMBeanInfoThe string {@code "true"} or {@code "false"} according as this @@ -240,7 +245,7 @@ import javax.management.openmbean.OpenType; * StandardMBean} class will have this field in its MBeanInfo * Descriptor.
openType{@link OpenType}
openType{@link OpenType}MBeanAttributeInfo
MBeanOperationInfo
MBeanParameterInfo

The Open Type of this element. In the case of {@code @@ -257,7 +262,7 @@ import javax.management.openmbean.OpenType; * which case it indicates the Open Type that the {@link * Notification#getUserData() user data} will have.

originalTypeString
originalTypeStringMBeanAttributeInfo
MBeanOperationInfo
MBeanParameterInfo

The original Java type of this element as it appeared in the @@ -273,7 +278,7 @@ import javax.management.openmbean.OpenType; * href="MXBean.html#type-names">Type Names of the MXBean * specification.

* - *
setExceptionsString[]
setExceptionsString[]MBeanAttributeInfoThe class names of the exceptions that can be thrown when setting @@ -282,7 +287,7 @@ import javax.management.openmbean.OpenType; * JMX API itself. Exceptions thrown when getting an attribute are specified * by the field {@code exceptions}. * - *
severityString
Integer
severityString
Integer
MBeanNotificationInfoThe severity of this notification. It can be 0 to mean @@ -290,7 +295,7 @@ import javax.management.openmbean.OpenType; * levels of severity. It can be represented as a decimal string or * an {@code Integer}.
sinceStringAny
sinceStringAnyThe version of the information model in which this element * was introduced. A set of MBeans defined by an application is @@ -299,13 +304,14 @@ import javax.management.openmbean.OpenType; * {@code "since"} field to record the version in which an element * first appeared.
unitsString
unitsStringMBeanAttributeInfo
MBeanParameterInfo
MBeanOperationInfo
The units in which an attribute, parameter, or operation return * value is measured, for example {@code "bytes"} or {@code * "seconds"}.
* *

Some additional fields are defined by Model MBeans. See the @@ -334,106 +340,113 @@ import javax.management.openmbean.OpenType; * * * - * + * + * + * + * + * + * * - * + * + * * * - * + * * * * - * + * * * - * + * * * - * + * * * - * + * * * - * + * * * - * + * * * * - * + * * * - * + * * * - * + * * * - * + * * * - * + * * * - * + * * * - * + * * * - * + * * * * - * + * * * * - * + * * * - * + * * * - * + * * * * - * + * * * - * + * * * * - * + * * * - * + * * * - * + * * * * - * + * * * + * *
ModelMBean Fields
NameTypeUsed inMeaning
NameTypeUsed inMeaning
classStringModelMBeanOperationInfo
classStringModelMBeanOperationInfoClass where method is defined (fully qualified).
currencyTimeLimitNumber
currencyTimeLimitNumberModelMBeanInfo
ModelMBeanAttributeInfo
ModelMBeanOperationInfo
How long cached value is valid: <0 never, =0 always, * >0 seconds.
defaultObjectModelMBeanAttributeInfo
defaultObjectModelMBeanAttributeInfoDefault value for attribute.
descriptorTypeStringAny
descriptorTypeStringAnyType of descriptor, "mbean", "attribute", "constructor", "operation", * or "notification".
displayNameStringAny
displayNameStringAnyHuman readable name of this item.
exportStringModelMBeanInfo
exportStringModelMBeanInfoName to be used to export/expose this MBean so that it is * findable by other JMX Agents.
getMethodStringModelMBeanAttributeInfo
getMethodStringModelMBeanAttributeInfoName of operation descriptor for get method.
lastUpdatedTimeStampNumber
lastUpdatedTimeStampNumberModelMBeanAttributeInfo
ModelMBeanOperationInfo
When value was set.
logStringModelMBeanInfo
ModelMBeanNotificationInfo
logStringModelMBeanInfo
ModelMBeanNotificationInfo
t or T: log all notifications, f or F: log no notifications.
logFileStringModelMBeanInfo
ModelMBeanNotificationInfo
logFileStringModelMBeanInfo
ModelMBeanNotificationInfo
Fully qualified filename to log events to.
messageIDStringModelMBeanNotificationInfo
messageIDStringModelMBeanNotificationInfoUnique key for message text (to allow translation, analysis).
messageTextStringModelMBeanNotificationInfo
messageTextStringModelMBeanNotificationInfoText of notification.
nameStringAny
nameStringAnyName of this item.
persistFileStringModelMBeanInfo
persistFileStringModelMBeanInfoFile name into which the MBean should be persisted.
persistLocationStringModelMBeanInfo
persistLocationStringModelMBeanInfoThe fully qualified directory name where the MBean should be * persisted (if appropriate).
persistPeriodNumber
persistPeriodNumberModelMBeanInfo
ModelMBeanAttributeInfo
Frequency of persist cycle in seconds. Used when persistPolicy is * "OnTimer" or "NoMoreOftenThan".
persistPolicyString
persistPolicyStringModelMBeanInfo
ModelMBeanAttributeInfo
One of: OnUpdate|OnTimer|NoMoreOftenThan|OnUnregister|Always|Never. * See the section "MBean Descriptor Fields" in the JMX specification * document.
presentationStringStringAny
presentationStringStringAnyXML formatted string to allow presentation of data.
protocolMapDescriptorModelMBeanAttributeInfo
protocolMapDescriptorModelMBeanAttributeInfoSee the section "Protocol Map Support" in the JMX specification * document. Mappings must be appropriate for the attribute and entries * can be updated or augmented at runtime.
roleString
roleStringModelMBeanConstructorInfo
ModelMBeanOperationInfo
One of "constructor", "operation", "getter", or "setter".
setMethodStringModelMBeanAttributeInfo
setMethodStringModelMBeanAttributeInfoName of operation descriptor for set method.
severityNumber
severityNumberModelMBeanNotificationInfo0-6 where 0: unknown; 1: non-recoverable; * 2: critical, failure; 3: major, severe; * 4: minor, marginal, error; 5: warning; * 6: normal, cleared, informative
targetObjectObjectModelMBeanOperationInfo
targetObjectObjectModelMBeanOperationInfoObject on which to execute this method.
targetTypeStringModelMBeanOperationInfo
targetTypeStringModelMBeanOperationInfotype of object reference for targetObject. Can be: * ObjectReference | Handle | EJBHandle | IOR | RMIReference.
valueObject
valueObjectModelMBeanAttributeInfo
ModelMBeanOperationInfo
Current (cached) value for attribute or operation.
visibilityNumberAny
visibilityNumberAny1-4 where 1: always visible, 4: rarely visible.
* * @since 1.5 diff --git a/jdk/src/java.management/share/classes/javax/management/DescriptorKey.java b/jdk/src/java.management/share/classes/javax/management/DescriptorKey.java index 592cb799f32..544018227aa 100644 --- a/jdk/src/java.management/share/classes/javax/management/DescriptorKey.java +++ b/jdk/src/java.management/share/classes/javax/management/DescriptorKey.java @@ -94,13 +94,17 @@ import java.lang.annotation.*; *

then the resulting {@code Descriptor} will contain the following * fields:

* - * + *
* - * - * - * - * + * + * + * + * + * + * + * * + * *
Descriptor Fields
NameValue
units"bytes"
descriptionResourceKey"bytes.key"
descriptionResourceBundleBaseName
NameValue
units"bytes"
descriptionResourceKey"bytes.key"
descriptionResourceBundleBaseName"com.example.foo.MBeanResources"
* *

An annotation such as {@code @Units} can be applied to:

@@ -144,24 +148,28 @@ import java.lang.annotation.*; * or an array of annotations. The value of the field is derived from * the value of the annotation element as follows:

* - * + *
* - * - * + * + * + * + * + * * - * + * * - * + * * - * + * * - * + * * + * *
Descriptor Field Types
Annotation elementDescriptor field
Primitive value ({@code 5}, {@code false}, etc)
Annotation elementDescriptor field
Primitive value ({@code 5}, {@code false}, etc)Wrapped value ({@code Integer.valueOf(5)}, * {@code Boolean.FALSE}, etc)
Class constant (e.g. {@code Thread.class})
Class constant (e.g. {@code Thread.class})Class name from {@link Class#getName()} * (e.g. {@code "java.lang.Thread"})
Enum constant (e.g. {@link ElementType#FIELD})
Enum constant (e.g. {@link ElementType#FIELD})Constant name from {@link Enum#name()} * (e.g. {@code "FIELD"})
Array of class constants or enum constants
Array of class constants or enum constantsString array derived by applying these rules to each * element
Value of any other type
- * ({@code String}, {@code String[]}, {@code int[]}, etc)
Value of any other type
+ * ({@code String}, {@code String[]}, {@code int[]}, etc)
The same value
* * @since 1.6 diff --git a/jdk/src/java.management/share/classes/javax/management/MXBean.java b/jdk/src/java.management/share/classes/javax/management/MXBean.java index 538cb66a471..73fb4e1703c 100644 --- a/jdk/src/java.management/share/classes/javax/management/MXBean.java +++ b/jdk/src/java.management/share/classes/javax/management/MXBean.java @@ -93,28 +93,26 @@ import javax.management.openmbean.TabularType; Standard MBean concept. Here is how a managed object might be represented as a Standard MBean, and as an MXBean:

- - - - - - - - - -
Standard Bean vs. MXBean
Standard MBeanMXBean
+    
+

Standard MBean

+
 public interface MemoryPoolMBean {
     String getName();
     MemoryUsage getUsage();
     // ...
 }
-          
+          
+ +
+

MXBean

+
 public interface MemoryPoolMXBean {
     String getName();
     MemoryUsage getUsage();
     // ...
 }
-          
+ +

As you can see, the definitions are very similar. The only difference is that the convention for naming the interface is to use @@ -134,13 +132,9 @@ public interface MemoryPoolMXBean {

So, we might define MemoryUsage like this:

- - - - - - - - - -
Standard Bean vs. MXBean
Standard MBeanMXBean
+    
+

Standard MBean

+
 public class MemoryUsage implements Serializable {
     // standard JavaBean conventions with getters
 
@@ -151,8 +145,11 @@ public class MemoryUsage implements Serializable {
     long getCommitted() {...}
     long getMax() {...}
 }
-          
+        
+ +
+

MXBean

+
 public class MemoryUsage {
     // standard JavaBean conventions with getters
     @ConstructorParameters({"init", "used", "committed", "max"})
@@ -163,9 +160,8 @@ public class MemoryUsage {
     long getCommitted() {...}
     long getMax() {...}
 }
-          
+ +

The definitions are the same in the two cases, except that with the MXBean, MemoryUsage no longer needs to @@ -197,29 +193,28 @@ public class MemoryUsage {

This becomes clearer if we compare what the clients of the two models might look like:

- - - - - - - - -
Standard Bean vs. MXBean
Standard MBeanMXBean
+    
+

Standard MBean

+
 String name = (String)
     mbeanServer.{@link MBeanServer#getAttribute
     getAttribute}(objectName, "Name");
 MemoryUsage usage = (MemoryUsage)
     mbeanServer.getAttribute(objectName, "Usage");
 long used = usage.getUsed();
-          
+        
+ +
+

MXBean

+
 String name = (String)
     mbeanServer.{@link MBeanServer#getAttribute
     getAttribute}(objectName, "Name");
 {@link CompositeData} usage = (CompositeData)
     mbeanServer.getAttribute(objectName, "Usage");
 long used = (Long) usage.{@link CompositeData#get get}("used");
-          
+ +

For attributes with simple types like String, the code is the same. But for attributes with complex types, the @@ -235,13 +230,9 @@ String name = (String) managed objects when you know the model beforehand, regardless of whether you are using Standard MBeans or MXBeans:

- - - - - - - - - -
Standard Bean vs. MXBean
Standard MBeanMXBean
+    
+

Standard MBean

+
 MemoryPoolMBean proxy =
     JMX.{@link JMX#newMBeanProxy(MBeanServerConnection, ObjectName,
               Class) newMBeanProxy}(
@@ -251,8 +242,11 @@ MemoryPoolMBean proxy =
 String name = proxy.getName();
 MemoryUsage usage = proxy.getUsage();
 long used = usage.getUsed();
-          
+          
+ +
+

MXBean

+
 MemoryPoolMXBean proxy =
     JMX.{@link JMX#newMXBeanProxy(MBeanServerConnection, ObjectName,
               Class) newMXBeanProxy}(
@@ -262,63 +256,58 @@ MemoryPoolMXBean proxy =
 String name = proxy.getName();
 MemoryUsage usage = proxy.getUsage();
 long used = usage.getUsed();
-          
+ +

Implementing the MemoryPool object works similarly for both Standard MBeans and MXBeans.

- - - - - - - - - -
Standard Bean vs. MXBean
Standard MBeanMXBean
+    
+

Standard MBean

+
 public class MemoryPool
         implements MemoryPoolMBean {
     public String getName() {...}
     public MemoryUsage getUsage() {...}
     // ...
 }
-          
+        
+ +
+

MXBean

+
 public class MemoryPool
         implements MemoryPoolMXBean {
     public String getName() {...}
     public MemoryUsage getUsage() {...}
     // ...
 }
-          
+ +

Registering the MBean in the MBean Server works in the same way in both cases:

- - - - - - - - - -
Standard Bean vs. MXBean
Standard MBeanMXBean
+    
+

Standard MBean

+
 {
     MemoryPoolMBean pool = new MemoryPool();
     mbeanServer.{@link MBeanServer#registerMBean
     registerMBean}(pool, objectName);
 }
-          
+        
+ +
+

MXBean

+
 {
     MemoryPoolMXBean pool = new MemoryPool();
     mbeanServer.{@link MBeanServer#registerMBean
     registerMBean}(pool, objectName);
 }
-          
+ +

Definition of an MXBean

@@ -486,70 +475,71 @@ public class MemoryPool + - - - + + + - + + - + - + - + - - - - + - + - + diff --git a/jdk/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanAttributeInfo.java b/jdk/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanAttributeInfo.java index 5ae3102013e..6f7dc152d5d 100644 --- a/jdk/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanAttributeInfo.java +++ b/jdk/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanAttributeInfo.java @@ -59,41 +59,45 @@ import javax.management.RuntimeOperationsException; * *
Type Mapping Rules
Java type Jopentype(J)opendata(J)Java type Jopentype(J)opendata(J)
{@code int}, {@code boolean}, etc
- (the 8 primitive Java types)
{@code int}, {@code boolean}, etc
+ (the 8 primitive Java types)
{@code SimpleType.INTEGER},
{@code SimpleType.BOOLEAN}, etc
{@code Integer}, {@code Boolean}, etc
(the corresponding boxed types)
{@code Integer}, {@code ObjectName}, etc
- (the types covered by {@link SimpleType})
{@code Integer}, {@code ObjectName}, etc
+ (the types covered by {@link SimpleType})
the corresponding {@code SimpleType} J, the same type
{@code int[]} etc
- (a one-dimensional array with
- primitive element type)
{@code int[]} etc
+ (a one-dimensional array with primitive element type)
{@code ArrayType.getPrimitiveArrayType(int[].class)} etc J, the same type
E{@code []}
+
E{@code []}
(an array with non-primitive element type E; - this includes {@code int[][]}, where E is {@code int[]}) + this includes {@code int[][]}, where E is {@code int[]})
{@code ArrayType.getArrayType(}opentype(E){@code )} opendata(E){@code []}
{@code List<}E{@code >}
+
{@code List<}E{@code >}
{@code Set<}E{@code >}
- {@code SortedSet<}E{@code >} (see below) + {@code SortedSet<}E{@code >} (see below)
same as for E{@code []} same as for E{@code []}
An enumeration E
+
An enumeration E
(declared in Java as {@code enum }E - {@code {...}}) + {@code {...}})
{@code SimpleType.STRING} {@code String}
{@code Map<}K,V{@code >}
- {@code SortedMap<}K,V{@code >}
{@code Map<}K,V{@code >}
+ {@code SortedMap<}K,V{@code >}
{@link TabularType}
(see below)
{@link TabularData}
(see below)
An MXBean interfaceAn MXBean interface {@code SimpleType.OBJECTNAME}
(see below)
{@link ObjectName}
(see below)
Any other typeAny other type {@link CompositeType}, if possible
(see below)
* - * - * + * + * + * + * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * - * + * - * + * * - * + * * - * + * * + * *
ModelMBeanAttributeInfo Fields
NameTypeMeaning
nameString
NameTypeMeaning
nameStringAttribute name.
descriptorTypeString
descriptorTypeStringMust be "attribute".
valueObject
valueObjectCurrent (cached) value for attribute.
defaultObject
defaultObjectDefault value for attribute.
displayNameString
displayNameStringName of attribute to be used in displays.
getMethodString
getMethodStringName of operation descriptor for get method.
setMethodString
setMethodStringName of operation descriptor for set method.
protocolMapDescriptor
protocolMapDescriptorSee the section "Protocol Map Support" in the JMX specification * document. Mappings must be appropriate for the attribute and entries * can be updated or augmented at runtime.
persistPolicyString
persistPolicyStringOne of: OnUpdate|OnTimer|NoMoreOftenThan|OnUnregister|Always|Never. * See the section "MBean Descriptor Fields" in the JMX specification * document.
persistPeriodNumber
persistPeriodNumberFrequency of persist cycle in seconds. Used when persistPolicy is * "OnTimer" or "NoMoreOftenThan".
currencyTimeLimitNumberHow long value is valid: <0 never, + *
currencyTimeLimitNumberHow long value is valid: <0 never, * =0 always, >0 seconds.
lastUpdatedTimeStampNumber
lastUpdatedTimeStampNumberWhen value was set.
visibilityNumber
visibilityNumber1-4 where 1: always visible, 4: rarely visible.
presentationStringString
presentationStringStringXML formatted string to allow presentation of data.
* *

The default descriptor contains the name, descriptorType and displayName diff --git a/jdk/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanConstructorInfo.java b/jdk/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanConstructorInfo.java index 7207047dfaa..cc8b417013a 100644 --- a/jdk/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanConstructorInfo.java +++ b/jdk/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanConstructorInfo.java @@ -60,19 +60,23 @@ import javax.management.RuntimeOperationsException; * * * - * - * + * + * + * + * + * * - * + * * - * + * * - * + * * - * + * * - * + * * + * *
ModelMBeanConstructorInfo Fields
NameTypeMeaning
nameString
NameTypeMeaning
nameStringConstructor name.
descriptorTypeString
descriptorTypeStringMust be "operation".
roleString
roleStringMust be "constructor".
displayNameString
displayNameStringHuman readable name of constructor.
visibilityNumber
visibilityNumber1-4 where 1: always visible 4: rarely visible.
presentationStringString
presentationStringStringXML formatted string to describe how to present operation
* *

The {@code persistPolicy} and {@code currencyTimeLimit} fields diff --git a/jdk/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanInfo.java b/jdk/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanInfo.java index 1ef54f2d3b0..494adf71475 100644 --- a/jdk/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanInfo.java +++ b/jdk/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanInfo.java @@ -167,40 +167,44 @@ public interface ModelMBeanInfo * * * - * - * + * + * + * + * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * + * *
ModelMBean Fields
NameTypeMeaning
nameString
NameTypeMeaning
nameStringMBean name.
descriptorTypeString
descriptorTypeStringMust be "mbean".
displayNameString
displayNameStringName of MBean to be used in displays.
persistPolicyString
persistPolicyStringOne of: OnUpdate|OnTimer|NoMoreOftenThan|OnUnregister|Always|Never. * See the section "MBean Descriptor Fields" in the JMX specification * document.
persistLocationString
persistLocationStringThe fully qualified directory name where the MBean should be * persisted (if appropriate).
persistFileString
persistFileStringFile name into which the MBean should be persisted.
persistPeriodNumber
persistPeriodNumberFrequency of persist cycle in seconds, for OnTime and * NoMoreOftenThan PersistPolicy
currencyTimeLimitNumber
currencyTimeLimitNumberHow long cached value is valid: <0 never, =0 always, * >0 seconds.
logString
logStringt: log all notifications, f: log no notifications.
logfileString
logfileStringFully qualified filename to log events to.
visibilityNumber
visibilityNumber1-4 where 1: always visible 4: rarely visible.
exportString
exportStringName to be used to export/expose this MBean so that it is * findable by other JMX Agents.
presentationStringString
presentationStringStringXML formatted string to allow presentation of data to be * associated with the MBean.
* *

diff --git a/jdk/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanNotificationInfo.java b/jdk/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanNotificationInfo.java index 79a5eedf557..5c7f8e22530 100644 --- a/jdk/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanNotificationInfo.java +++ b/jdk/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanNotificationInfo.java @@ -58,28 +58,32 @@ import javax.management.RuntimeOperationsException; * * * - * - * + * + * + * + * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * + * *
ModelMBeanNotificationInfo Fields
NameTypeMeaning
nameString
NameTypeMeaning
nameStringNotification name.
descriptorTypeString
descriptorTypeStringMust be "notification".
severityNumber
severityNumber0-6 where 0: unknown; 1: non-recoverable; * 2: critical, failure; 3: major, severe; * 4: minor, marginal, error; 5: warning; * 6: normal, cleared, informative
messageIDString
messageIDStringUnique key for message text (to allow translation, analysis).
messageTextString
messageTextStringText of notification.
logString
logStringT - log message, F - do not log message.
logfileString
logfileStringfully qualified file name appropriate for operating system.
visibilityNumber
visibilityNumber1-4 where 1: always visible 4: rarely visible.
presentationStringString
presentationStringStringXML formatted string to allow presentation of data.
* *

The default descriptor contains the name, descriptorType, diff --git a/jdk/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanOperationInfo.java b/jdk/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanOperationInfo.java index cbf0aeff7c2..708bf164dfb 100644 --- a/jdk/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanOperationInfo.java +++ b/jdk/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanOperationInfo.java @@ -61,32 +61,36 @@ import javax.management.RuntimeOperationsException; * * * - * - * + * + * + * + * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * + * *
ModelMBeanOperationInfo Fields
NameTypeMeaning
nameString
NameTypeMeaning
nameStringOperation name.
descriptorTypeString
descriptorTypeStringMust be "operation".
classString
classStringClass where method is defined (fully qualified).
roleString
roleStringMust be "operation", "getter", or "setter".
targetObjectObject
targetObjectObjectObject on which to execute this method.
targetTypeString
targetTypeStringtype of object reference for targetObject. Can be: * ObjectReference | Handle | EJBHandle | IOR | RMIReference.
valueObject
valueObjectCached value for operation.
displayNameString
displayNameStringHuman readable display name of the operation.
currencyTimeLimitNumber
currencyTimeLimitNumberHow long cached value is valid.
lastUpdatedTimeStampNumber
lastUpdatedTimeStampNumberWhen cached value was set.
visibilityNumber
visibilityNumber1-4 where 1: always visible 4: rarely visible.
presentationStringString
presentationStringStringXML formatted string to describe how to present operation
* *

The default descriptor will have name, descriptorType, displayName and diff --git a/jdk/src/java.management/share/classes/javax/management/remote/JMXConnectionNotification.java b/jdk/src/java.management/share/classes/javax/management/remote/JMXConnectionNotification.java index 5bf136430b6..0ba100ec8b2 100644 --- a/jdk/src/java.management/share/classes/javax/management/remote/JMXConnectionNotification.java +++ b/jdk/src/java.management/share/classes/javax/management/remote/JMXConnectionNotification.java @@ -40,34 +40,38 @@ import javax.management.ObjectName; * *

The notification type is one of the following:

* - * + *
* * + * * - * - * + * + * * + * * + * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * + * *
JMXConnectionNotification Types
TypeMeaningTypeMeaning
jmx.remote.connection.openedjmx.remote.connection.openedA new client connection has been opened.
jmx.remote.connection.closedjmx.remote.connection.closedA client connection has been closed.
jmx.remote.connection.failedjmx.remote.connection.failedA client connection has failed unexpectedly.
jmx.remote.connection.notifs.lostjmx.remote.connection.notifs.lostA client connection has potentially lost notifications. This * notification only appears on the client side.
* *

The timeStamp of the notification is a time value