com.jrockit.mc.rjmx.subscription
Class AttributeInfoToolkit

java.lang.Object
  extended by com.jrockit.mc.rjmx.subscription.AttributeInfoToolkit

public final class AttributeInfoToolkit
extends java.lang.Object

Helper class for extracting some commonly used meta-data attributes from the IAttributeInfoService.

Author:
Marcus Hirt

Method Summary
static IAttributeInfo getAttributeInfo(IConnectionHandle handle, AttributeDescriptor descriptor)
          Returns true if the AttributeDescriptor is a composite child.
static IAttributeInfo[] getCompositeChildren(IConnectionHandle handle, IAttributeInfo attributeInfo)
          Returns the composite children for the specified attribute info.
static IAttributeInfo getCompositeParent(IConnectionHandle handle, IAttributeInfo compositeChild)
          Returns the composite parent for a specified attribute info.
static java.lang.String getDescription(IConnectionHandle handle, AttributeDescriptor attributeDescriptor)
          Returns the description for the specified attribute info.
static java.lang.String getDisplayName(IConnectionHandle handle, AttributeDescriptor attributeDescriptor)
          This represents a more user friendly display name for the attribute.
static boolean isSynthetic(javax.management.ObjectName objectName)
          Returns true if the ObjectName is synthetic
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDisplayName

public static java.lang.String getDisplayName(IConnectionHandle handle,
                                              AttributeDescriptor attributeDescriptor)
This represents a more user friendly display name for the attribute. If available, the display name will be retrieved from the meta-data available in the AttributeInfoService, otherwise the attribute name will be massaged into a more user friendly form.

Parameters:
handle - the connection handle for which to check.
attributeDescriptor - the descriptor for which to retrieve the display name.
Returns:
the defined display name for this attribute. Can be overridden by meta-data.

getCompositeChildren

public static IAttributeInfo[] getCompositeChildren(IConnectionHandle handle,
                                                    IAttributeInfo attributeInfo)
Returns the composite children for the specified attribute info.

Parameters:
handle - the connection handle for which to check.
attributeInfo - the info for which to attempt to derive the composite children.
Returns:
the defined display name for this attribute. Can be overridden by meta-data.

getDescription

public static java.lang.String getDescription(IConnectionHandle handle,
                                              AttributeDescriptor attributeDescriptor)
Returns the description for the specified attribute info.

Parameters:
handle - the connection handle for which to check.
attributeDescriptor - the descriptor for which to retrieve the description.
Returns:
the description for this attribute. Can be overridden by meta-data.

getCompositeParent

public static IAttributeInfo getCompositeParent(IConnectionHandle handle,
                                                IAttributeInfo compositeChild)
                                         throws java.lang.IllegalArgumentException
Returns the composite parent for a specified attribute info.

Parameters:
compositeChild - the attribute to retrieve the parent for.
Returns:
the parent of the composite child.
Throws:
java.lang.IllegalArgumentException - if the supplied attribute is not a composite.

isSynthetic

public static boolean isSynthetic(javax.management.ObjectName objectName)
Returns true if the ObjectName is synthetic

Parameters:
objectName - the ObjectName
Returns:
true if the AttributeDescriptor is synthetic

getAttributeInfo

public static IAttributeInfo getAttributeInfo(IConnectionHandle handle,
                                              AttributeDescriptor descriptor)
Returns true if the AttributeDescriptor is a composite child.

Parameters:
descriptor - the attribute
Returns:
the attribute info


Copyright © 1999, 2011, Oracle and/or its affiliates. All rights reserved.