APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.management.internal

public Class DiagnosticCommandImpl

extends NotificationEmitterSupport
implements DiagnosticCommandMBean
Class Inheritance
All Implemented Interfaces
com.sun.management.DiagnosticCommandMBean, javax.management.DynamicMBean
Imports
com.sun.management.DiagnosticCommandMBean, java.lang.reflect.Constructor, .InvocationTargetException, java.util.*, javax.management.Attribute, .AttributeList, .AttributeNotFoundException, .Descriptor, .ImmutableDescriptor, .InvalidAttributeValueException, .ListenerNotFoundException, .MBeanException, .MBeanInfo, .MBeanNotificationInfo, .MBeanOperationInfo, .MBeanParameterInfo, .MalformedObjectNameException, .Notification, .NotificationFilter, .NotificationListener, .ObjectName, .ReflectionException, sun.management.ManagementFactoryHelper, .NotificationEmitterSupport, .VMManagement

Implementation class for the diagnostic commands subsystem.
Since
1.8

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private class

Field Summary

Modifier and TypeField and Description
private static DiagnosticCommandImpl
private static final String[]
private final boolean
private final VMManagement
private MBeanNotificationInfo[]
private static final String
private static final String[]
private static long
private static final String
private static final String
private volatile Map<String, DiagnosticCommandImpl.Wrapper>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public synchronized void
private Descriptor
private void
private native String
public Object
getAttribute(String attribute)

Implements javax.management.DynamicMBean.getAttribute.

Obtain the value of a specific attribute of the Dynamic MBean.

public AttributeList
getAttributes(String[] attributes)

Implements javax.management.DynamicMBean.getAttributes.

Get the values of several attributes of the Dynamic MBean.

private native DiagnosticCommandInfo[]
pack-priv static synchronized DiagnosticCommandMBean
private native String[]
public MBeanInfo
getMBeanInfo()

Implements javax.management.DynamicMBean.getMBeanInfo.

Provides the exposed attributes and actions of the Dynamic MBean using an MBeanInfo object.

private static long
public MBeanNotificationInfo[]
getNotificationInfo()

Implements abstract sun.management.NotificationEmitterSupport.getNotificationInfo.

Implements javax.management.NotificationBroadcaster.getNotificationInfo.

Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type.

public Object
invoke(String actionName, Object[] params, String[] signature)

Implements javax.management.DynamicMBean.invoke.

Allows an action to be invoked on the Dynamic MBean.

public synchronized void
public synchronized void
private static final String
sanitiseType(String typeName)

public void
setAttribute(Attribute attribute)

Implements javax.management.DynamicMBean.setAttribute.

Set the value of a specific attribute of the Dynamic MBean.

public AttributeList
setAttributes(AttributeList attributes)

Implements javax.management.DynamicMBean.setAttributes.

Sets the values of several attributes of the Dynamic MBean.

private native void
setNotificationEnabled(boolean enabled)

private static String
Inherited from sun.management.NotificationEmitterSupport:
hasListenerssendNotification

Field Detail

diagCommandMBeanback to summary
private static DiagnosticCommandImpl diagCommandMBean
diagFramNotifTypesback to summary
private static final String[] diagFramNotifTypes
isSupportedback to summary
private final boolean isSupported
jvmback to summary
private final VMManagement jvm
notifInfoback to summary
private MBeanNotificationInfo[] notifInfo
notifNameback to summary
private static final String notifName
publicTypesback to summary
private static final String[] publicTypes
seqNumberback to summary
private static long seqNumber
strArrayClassNameback to summary
private static final String strArrayClassName
strClassNameback to summary
private static final String strClassName
wrappersback to summary
private volatile Map<String, DiagnosticCommandImpl.Wrapper> wrappers

Constructor Detail

DiagnosticCommandImplback to summary
pack-priv DiagnosticCommandImpl(VMManagement jvm)

Method Detail

addNotificationListenerback to summary
public synchronized void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)

Overrides sun.management.NotificationEmitterSupport.addNotificationListener.

Implements javax.management.NotificationBroadcaster.addNotificationListener.

Doc from javax.management.NotificationBroadcaster.addNotificationListener.

Adds a listener to this MBean.

Annotations
@Override
commandDescriptorback to summary
private Descriptor commandDescriptor(DiagnosticCommandImpl.Wrapper w) throws IllegalArgumentException
createDiagnosticFrameworkNotificationback to summary
private void createDiagnosticFrameworkNotification()
executeDiagnosticCommandback to summary
private native String executeDiagnosticCommand(String command)
getAttributeback to summary
public Object getAttribute(String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException

Implements javax.management.DynamicMBean.getAttribute.

Doc from javax.management.DynamicMBean.getAttribute.

Obtain the value of a specific attribute of the Dynamic MBean.

Annotations
@Override
Exceptions
AttributeNotFoundException:
if specified attribute does not exist or cannot be retrieved
MBeanException:
Wraps a java.lang.Exception thrown by the MBean's getter.
ReflectionException:
Wraps a java.lang.Exception thrown while trying to invoke the getter.
getAttributesback to summary
public AttributeList getAttributes(String[] attributes)

Implements javax.management.DynamicMBean.getAttributes.

Doc from javax.management.DynamicMBean.getAttributes.

Get the values of several attributes of the Dynamic MBean.

Annotations
@Override
getDiagnosticCommandInfoback to summary
private native DiagnosticCommandInfo[] getDiagnosticCommandInfo(String[] commands)
getDiagnosticCommandMBeanback to summary
pack-priv static synchronized DiagnosticCommandMBean getDiagnosticCommandMBean()
getDiagnosticCommandsback to summary
private native String[] getDiagnosticCommands()
getMBeanInfoback to summary
public MBeanInfo getMBeanInfo()

Implements javax.management.DynamicMBean.getMBeanInfo.

Doc from javax.management.DynamicMBean.getMBeanInfo.

Provides the exposed attributes and actions of the Dynamic MBean using an MBeanInfo object.

Annotations
@Override
getNextSeqNumberback to summary
private static long getNextSeqNumber()
getNotificationInfoback to summary
public MBeanNotificationInfo[] getNotificationInfo()

Implements abstract sun.management.NotificationEmitterSupport.getNotificationInfo.

Implements javax.management.NotificationBroadcaster.getNotificationInfo.

Doc from javax.management.NotificationBroadcaster.getNotificationInfo.

Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type.

It is not illegal for the MBean to send notifications not described in this array. However, some clients of the MBean server may depend on the array being complete for their correct functioning.

Annotations
@Override
invokeback to summary
public Object invoke(String actionName, Object[] params, String[] signature) throws MBeanException, ReflectionException

Implements javax.management.DynamicMBean.invoke.

Doc from javax.management.DynamicMBean.invoke.

Allows an action to be invoked on the Dynamic MBean.

Annotations
@Override
Exceptions
MBeanException:
Wraps a java.lang.Exception thrown by the MBean's invoked method.
ReflectionException:
Wraps a java.lang.Exception thrown while trying to invoke the method
removeNotificationListenerback to summary
public synchronized void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException

Overrides sun.management.NotificationEmitterSupport.removeNotificationListener.

Implements javax.management.NotificationBroadcaster.removeNotificationListener.

Doc from javax.management.NotificationBroadcaster.removeNotificationListener.

Removes a listener from this MBean. If the listener has been registered with different handback objects or notification filters, all entries corresponding to the listener will be removed.

Annotations
@Override
Exceptions
ListenerNotFoundException:
The listener is not registered with the MBean.
removeNotificationListenerback to summary
public synchronized void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException

Overrides sun.management.NotificationEmitterSupport.removeNotificationListener.

Implements javax.management.NotificationEmitter.removeNotificationListener.

Doc from javax.management.NotificationEmitter.removeNotificationListener.

Removes a listener from this MBean. The MBean must have a listener that exactly matches the given listener, filter, and handback parameters. If there is more than one such listener, only one is removed.

The filter and handback parameters may be null if and only if they are null in a listener to be removed.

Annotations
@Override
Exceptions
ListenerNotFoundException:
The listener is not registered with the MBean, or it is not registered with the given filter and handback.
sanitiseTypeback to summary
private static final String sanitiseType(String typeName)
setAttributeback to summary
public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException

Implements javax.management.DynamicMBean.setAttribute.

Doc from javax.management.DynamicMBean.setAttribute.

Set the value of a specific attribute of the Dynamic MBean.

Annotations
@Override
Exceptions
AttributeNotFoundException:
if specified attribute does not exist or cannot be retrieved
InvalidAttributeValueException:
if value specified is not valid for the attribute
MBeanException:
Wraps a java.lang.Exception thrown by the MBean's setter.
ReflectionException:
Wraps a java.lang.Exception thrown while trying to invoke the MBean's setter.
setAttributesback to summary
public AttributeList setAttributes(AttributeList attributes)

Implements javax.management.DynamicMBean.setAttributes.

Doc from javax.management.DynamicMBean.setAttributes.

Sets the values of several attributes of the Dynamic MBean.

Annotations
@Override
setNotificationEnabledback to summary
private native void setNotificationEnabled(boolean enabled)
transformback to summary
private static String transform(String name)
com.sun.management.internal back to summary

private Class DiagnosticCommandImpl.OperationInfoComparator

extends Object
implements Comparator<MBeanOperationInfo>
Class Inheritance
  • java.lang.Object
  • com.sun.management.internal.DiagnosticCommandImpl.OperationInfoComparator
All Implemented Interfaces
java.util.Comparator

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public int
compare(MBeanOperationInfo o1, MBeanOperationInfo o2)

Implements java.util.Comparator.compare.

Compares its two arguments for order.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

OperationInfoComparatorback to summary
private OperationInfoComparator()

Method Detail

compareback to summary
public int compare(MBeanOperationInfo o1, MBeanOperationInfo o2)

Implements java.util.Comparator.compare.

Doc from java.util.Comparator.compare.

Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

The implementor must ensure that signum(compare(x, y)) == -signum(compare(y, x)) for all x and y. (This implies that compare(x, y) must throw an exception if and only if compare(y, x) throws an exception.)

The implementor must also ensure that the relation is transitive: ((compare(x, y)>0) && (compare(y, z)>0)) implies compare(x, z)>0.

Finally, the implementor must ensure that compare(x, y)==0 implies that signum(compare(x, z))==signum(compare(y, z)) for all z.

Annotations
@Override
com.sun.management.internal back to summary

private Class DiagnosticCommandImpl.Wrapper

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv String
pack-priv DiagnosticCommandInfo
pack-priv String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public String
execute(String[] args)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cmdback to summary
pack-priv String cmd
infoback to summary
pack-priv DiagnosticCommandInfo info
nameback to summary
pack-priv String name

Constructor Detail

Wrapperback to summary
pack-priv Wrapper(String name, String cmd, DiagnosticCommandInfo info) throws InstantiationException

Method Detail

executeback to summary
public String execute(String[] args)