Top Inners Fields Constructors Methods
sun.tools.jconsole.inspector

public Class XTree

extends JTree
Class Inheritance
Annotations
@SuppressWarnings:serial
Imports
java.io.IOException, java.util.*, javax.management.*, javax.swing.*, javax.swing.tree.*, sun.tools.jconsole.JConsole, .MBeansTab, .Messages, sun.tools.jconsole.inspector.XNodeInfo

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
private static class
private static class

Field Summary

Modifier and TypeField and Description
private boolean
private MBeansTab
private Map<String, DefaultMutableTreeNode>
private static final List<String>
private static boolean
private static boolean
Inherited from javax.swing.JTree:
ANCHOR_SELECTION_PATH_PROPERTYCELL_EDITOR_PROPERTYCELL_RENDERER_PROPERTYcellEditorcellRenderereditableEDITABLE_PROPERTYEXPANDS_SELECTED_PATHS_PROPERTYINVOKES_STOP_CELL_EDITING_PROPERTYinvokesStopCellEditingLARGE_MODEL_PROPERTYlargeModelLEAD_SELECTION_PATH_PROPERTYROOT_VISIBLE_PROPERTYrootVisibleROW_HEIGHT_PROPERTYrowHeightSCROLLS_ON_EXPAND_PROPERTYscrollsOnExpandSELECTION_MODEL_PROPERTYselectionModelselectionRedirectorSHOWS_ROOT_HANDLES_PROPERTYshowsRootHandlesTOGGLE_CLICK_COUNT_PROPERTYtoggleClickCountTREE_MODEL_PROPERTYtreeModeltreeModelListenerVISIBLE_ROW_COUNT_PROPERTYvisibleRowCount

Constructor Summary

AccessConstructor and Description
public
XTree(MBeansTab mbeansTab)

public
XTree(TreeNode root, MBeansTab mbeansTab)

Method Summary

Modifier and TypeMethod and Description
private synchronized void
addChildNode(DefaultMutableTreeNode parent, DefaultMutableTreeNode child, int index)

This method adds the child to the specified parent node at specific index.

private synchronized void
addChildNode(DefaultMutableTreeNode parent, DefaultMutableTreeNode child)

This method adds the child to the specified parent node.

public synchronized void
public synchronized void
private synchronized void
public void
private synchronized void
private DefaultMutableTreeNode
createDnNode(XTree.Dn dn, XTree.Token token, XMBean xmbean)

Creates the node corresponding to the whole Dn, i.e. an MBean.

private DefaultMutableTreeNode
createDomainNode(XTree.Dn dn, XTree.Token token)

Creates the domain node.

private Object
private DefaultMutableTreeNode
createSubDnNode(XTree.Dn dn, XTree.Token token)

Creates the node corresponding to a subDn, i.e. a non-MBean intermediate node.

private static Map<String, String>
extractKeyValuePairs(String props, ObjectName mbean)

Parses the MBean ObjectName comma-separated properties string and puts the individual key/value pairs into the map.

private static String
getKeyPropertyListString(ObjectName mbean)

Returns the ordered key property list that will be used to build the MBean tree.

private static boolean
public boolean
hasMetadataNodes(DefaultMutableTreeNode node)

Returns true if any of the children nodes is an MBean metadata node.

private boolean
hasNonMetadataNodes(DefaultMutableTreeNode node)

Returns true if any of the children nodes is a non MBean metadata node.

private boolean
public boolean
isMetadataNode(DefaultMutableTreeNode node)

Returns true if the given node is an MBean metadata node.

private static boolean
public synchronized void
removeAll()

Overrides java.awt.Container.removeAll.

This method removes all the displayed nodes from the tree, but does not affect actual MBeanServer contents.
private synchronized void
removeChildNode(DefaultMutableTreeNode child)

This method removes the node from its parent

public synchronized void
private void
removeMetadataNodes(DefaultMutableTreeNode node)

Remove the metadata nodes associated with a given MBean node.

private DefaultMutableTreeNode
removeParentFromView(XTree.Dn dn, int index, DefaultMutableTreeNode node)

Removes only the parent nodes which are non MBean and leaf.

Inherited from javax.swing.JTree:
addSelectionIntervaladdSelectionPathaddSelectionPathsaddSelectionRowaddSelectionRowsaddTreeExpansionListeneraddTreeSelectionListeneraddTreeWillExpandListenercancelEditingclearSelectionclearToggledPathscollapsePathcollapseRowconvertValueToTextcreateTreeModelcreateTreeModelListenerexpandPathexpandRowfireTreeCollapsedfireTreeExpandedfireTreeWillCollapsefireTreeWillExpandfireValueChangedgetAccessibleContextgetAnchorSelectionPathgetCellEditorgetCellRenderergetClosestPathForLocationgetClosestRowForLocationgetDefaultTreeModelgetDescendantToggledPathsgetDragEnabledgetDropLocationgetDropModegetEditingPathgetExpandedDescendantsgetExpandsSelectedPathsgetInvokesStopCellEditinggetLastSelectedPathComponentgetLeadSelectionPathgetLeadSelectionRowgetMaxSelectionRowgetMinSelectionRowgetModelgetNextMatchgetPathBetweenRowsgetPathBoundsgetPathForLocationgetPathForRowgetPreferredScrollableViewportSizegetRowBoundsgetRowCountgetRowForLocationgetRowForPathgetRowHeightgetScrollableBlockIncrementgetScrollableTracksViewportHeightgetScrollableTracksViewportWidthgetScrollableUnitIncrementgetScrollsOnExpandgetSelectionCountgetSelectionModelgetSelectionPathgetSelectionPathsgetSelectionRowsgetShowsRootHandlesgetToggleClickCountgetToolTipTextgetTreeExpansionListenersgetTreeSelectionListenersgetTreeWillExpandListenersgetUIgetUIClassIDgetVisibleRowCounthasBeenExpandedisCollapsedisCollapsedisEditableisEditingisExpandedisExpandedisFixedRowHeightisLargeModelisPathEditableisPathSelectedisRootVisibleisRowSelectedisSelectionEmptyisVisiblemakeVisibleparamStringremoveDescendantSelectedPathsremoveDescendantToggledPathsremoveSelectionIntervalremoveSelectionPathremoveSelectionPathsremoveSelectionRowremoveSelectionRowsremoveTreeExpansionListenerremoveTreeSelectionListenerremoveTreeWillExpandListenerscrollPathToVisiblescrollRowToVisiblesetAnchorSelectionPathsetCellEditorsetCellRenderersetDragEnabledsetDropModesetEditablesetExpandedStatesetExpandsSelectedPathssetInvokesStopCellEditingsetLargeModelsetLeadSelectionPathsetModelsetRootVisiblesetRowHeightsetScrollsOnExpandsetSelectionIntervalsetSelectionModelsetSelectionPathsetSelectionPathssetSelectionRowsetSelectionRowssetShowsRootHandlessetToggleClickCountsetUIsetVisibleRowCountstartEditingAtPathstopEditingtreeDidChangeupdateUI

Field Detail

keyValueViewback to summary
private boolean keyValueView
mbeansTabback to summary
private MBeansTab mbeansTab
nodesback to summary
private Map<String, DefaultMutableTreeNode> nodes
orderedKeyPropertyListback to summary
private static final List<String> orderedKeyPropertyList
treeViewback to summary
private static boolean treeView
treeViewInitback to summary
private static boolean treeViewInit

Constructor Detail

XTreeback to summary
public XTree(MBeansTab mbeansTab)
XTreeback to summary
public XTree(TreeNode root, MBeansTab mbeansTab)

Method Detail

addChildNodeback to summary
private synchronized void addChildNode(DefaultMutableTreeNode parent, DefaultMutableTreeNode child, int index)

This method adds the child to the specified parent node at specific index.

addChildNodeback to summary
private synchronized void addChildNode(DefaultMutableTreeNode parent, DefaultMutableTreeNode child)

This method adds the child to the specified parent node. The index where the child is to be added depends on the child node being Comparable or not. If the child node is not Comparable then it is added at the end, i.e. right after the current parent's children.

addMBeansToViewback to summary
public synchronized void addMBeansToView(Set<ObjectName> mbeans)
addMBeanToViewback to summary
public synchronized void addMBeanToView(ObjectName mbean)
addMBeanToViewback to summary
private synchronized void addMBeanToView(ObjectName mbean, XMBean xmbean, XTree.Dn dn)
addMetadataNodesback to summary
public void addMetadataNodes(DefaultMutableTreeNode node)
changeNodeValueback to summary
private synchronized void changeNodeValue(DefaultMutableTreeNode node, XNodeInfo nodeValue)
createDnNodeback to summary
private DefaultMutableTreeNode createDnNode(XTree.Dn dn, XTree.Token token, XMBean xmbean)

Creates the node corresponding to the whole Dn, i.e. an MBean.

createDomainNodeback to summary
private DefaultMutableTreeNode createDomainNode(XTree.Dn dn, XTree.Token token)

Creates the domain node.

createNodeValueback to summary
private Object createNodeValue(XMBean xmbean, XTree.Token token)
createSubDnNodeback to summary
private DefaultMutableTreeNode createSubDnNode(XTree.Dn dn, XTree.Token token)

Creates the node corresponding to a subDn, i.e. a non-MBean intermediate node.

extractKeyValuePairsback to summary
private static Map<String, String> extractKeyValuePairs(String props, ObjectName mbean)

Parses the MBean ObjectName comma-separated properties string and puts the individual key/value pairs into the map. Key order in the properties string is preserved by the map.

getKeyPropertyListStringback to summary
private static String getKeyPropertyListString(ObjectName mbean)

Returns the ordered key property list that will be used to build the MBean tree. If the "com.sun.tools.jconsole.mbeans.keyPropertyList" system property is not specified, then the ordered key property list used to build the MBean tree will be the one returned by the method ObjectName.getKeyPropertyListString() with "type" as first key, and "j2eeType" as second key, if present. If any of the keys specified in the comma-separated key property list does not apply to the given MBean then it will be discarded.

getTreeViewValueback to summary
private static boolean getTreeViewValue()
hasMetadataNodesback to summary
public boolean hasMetadataNodes(DefaultMutableTreeNode node)

Returns true if any of the children nodes is an MBean metadata node.

hasNonMetadataNodesback to summary
private boolean hasNonMetadataNodes(DefaultMutableTreeNode node)

Returns true if any of the children nodes is a non MBean metadata node.

isKeyValueViewback to summary
private boolean isKeyValueView()
isMetadataNodeback to summary
public boolean isMetadataNode(DefaultMutableTreeNode node)

Returns true if the given node is an MBean metadata node.

isTreeViewback to summary
private static boolean isTreeView()
removeAllback to summary
public synchronized void removeAll()

Overrides java.awt.Container.removeAll.

This method removes all the displayed nodes from the tree, but does not affect actual MBeanServer contents.

Annotations
@Override
removeChildNodeback to summary
private synchronized void removeChildNode(DefaultMutableTreeNode child)

This method removes the node from its parent

removeMBeanFromViewback to summary
public synchronized void removeMBeanFromView(ObjectName mbean)
removeMetadataNodesback to summary
private void removeMetadataNodes(DefaultMutableTreeNode node)

Remove the metadata nodes associated with a given MBean node.

removeParentFromViewback to summary
private DefaultMutableTreeNode removeParentFromView(XTree.Dn dn, int index, DefaultMutableTreeNode node)

Removes only the parent nodes which are non MBean and leaf. This method assumes the child nodes have been removed before.

sun.tools.jconsole.inspector back to summary

private Class XTree.ComparableDefaultMutableTreeNode

extends DefaultMutableTreeNode
implements Comparable<DefaultMutableTreeNode>
Class Inheritance
All Implemented Interfaces
java.lang.Comparable

Field Summary

Inherited from javax.swing.tree.DefaultMutableTreeNode:
allowsChildrenchildrenEMPTY_ENUMERATIONparentuserObject

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public int
compareTo(DefaultMutableTreeNode
the object to be compared.
node
)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.
Inherited from javax.swing.tree.DefaultMutableTreeNode:
addbreadthFirstEnumerationchildrenclonedepthFirstEnumerationgetAllowsChildrengetChildAftergetChildAtgetChildBeforegetChildCountgetDepthgetFirstChildgetFirstLeafgetIndexgetLastChildgetLastLeafgetLeafCountgetLevelgetNextLeafgetNextNodegetNextSiblinggetParentgetPathgetPathToRootgetPreviousLeafgetPreviousNodegetPreviousSiblinggetRootgetSharedAncestorgetSiblingCountgetUserObjectgetUserObjectPathinsertisLeafisNodeAncestorisNodeChildisNodeDescendantisNodeRelatedisNodeSiblingisRootpathFromAncestorEnumerationpostorderEnumerationpreorderEnumerationremoveremoveremoveAllChildrenremoveFromParentsetAllowsChildrensetParentsetUserObjecttoString

Constructor Detail

ComparableDefaultMutableTreeNodeback to summary
private ComparableDefaultMutableTreeNode()

Method Detail

compareToback to summary
public int compareTo(DefaultMutableTreeNode node)

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

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

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

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

Parameters
node:DefaultMutableTreeNode

the object to be compared.

Returns:int

a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

sun.tools.jconsole.inspector back to summary

private Class XTree.Dn

extends Object
implements Comparable<XTree.Dn>
Class Inheritance
All Implemented Interfaces
java.lang.Comparable

Field Summary

Modifier and TypeField and Description
private String
private String
private String
private ObjectName
private List<XTree.Token>

Constructor Summary

AccessConstructor and Description
public
Dn(ObjectName mbean)

Method Summary

Modifier and TypeMethod and Description
public int
compareTo(XTree.Dn
the object to be compared.
dn
)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.
private void
public String
public String
public String
public String
public ObjectName
public XTree.Token
getToken(int index)

public int
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

domainback to summary
private String domain
hashDnback to summary
private String hashDn
keyPropertyListback to summary
private String keyPropertyList
mbeanback to summary
private ObjectName mbean
tokensback to summary
private List<XTree.Token> tokens

Constructor Detail

Dnback to summary
public Dn(ObjectName mbean)

Method Detail

compareToback to summary
public int compareTo(XTree.Dn dn)

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

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

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

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

Parameters
dn:XTree.Dn

the object to be compared.

Returns:int

a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

computeHashDnback to summary
private void computeHashDn()
getDomainback to summary
public String getDomain()
getHashDnback to summary
public String getHashDn()
getHashKeyback to summary
public String getHashKey(XTree.Token token)
getKeyPropertyListback to summary
public String getKeyPropertyList()
getObjectNameback to summary
public ObjectName getObjectName()
getTokenback to summary
public XTree.Token getToken(int index)
getTokenCountback to summary
public int getTokenCount()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override
sun.tools.jconsole.inspector back to summary

private Class XTree.MBeanInfoNodesSwingWorker

extends SwingWorker<Object[], Void>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final XMBean
private final DefaultTreeModel
private final DefaultMutableTreeNode

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
public Object[]
doInBackground()

Implements abstract javax.swing.SwingWorker.doInBackground.

Computes a result, or throws an exception if unable to do so.
protected void
done()

Overrides javax.swing.SwingWorker.done.

Executed on the Event Dispatch Thread after the doInBackground method is finished.
Inherited from javax.swing.SwingWorker:
addPropertyChangeListenercancelexecutefirePropertyChangegetgetgetProgressgetPropertyChangeSupportgetStateisCancelledisDoneprocesspublishremovePropertyChangeListenerrunsetProgress

Field Detail

mbeanback to summary
private final XMBean mbean
modelback to summary
private final DefaultTreeModel model
nodeback to summary
private final DefaultMutableTreeNode node

Constructor Detail

MBeanInfoNodesSwingWorkerback to summary
public MBeanInfoNodesSwingWorker(DefaultTreeModel model, DefaultMutableTreeNode node, XMBean mbean)

Method Detail

addMBeanInfoNodesback to summary
private void addMBeanInfoNodes(DefaultTreeModel tree, DefaultMutableTreeNode node, XMBean mbean, MBeanInfo mbeanInfo, Boolean isBroadcaster)
doInBackgroundback to summary
public Object[] doInBackground() throws InstanceNotFoundException, IntrospectionException, ReflectionException, IOException

Implements abstract javax.swing.SwingWorker.doInBackground.

Doc from javax.swing.SwingWorker.doInBackground.

Computes a result, or throws an exception if unable to do so.

Note that this method is executed only once.

Note

this method is executed in a background thread.

Returns:Object[]

the computed result

Annotations
@Override
doneback to summary
protected void done()

Overrides javax.swing.SwingWorker.done.

Doc from javax.swing.SwingWorker.done.

Executed on the Event Dispatch Thread after the doInBackground method is finished. The default implementation does nothing. Subclasses may override this method to perform completion actions on the Event Dispatch Thread. Note that you can query status inside the implementation of this method to determine the result of this task or whether this task has been cancelled.

Annotations
@Override
sun.tools.jconsole.inspector back to summary

private Class XTree.Token

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private String
private String
private String
private String

Constructor Summary

AccessConstructor and Description
public
Token(String tokenType, String tokenValue)

Method Summary

Modifier and TypeMethod and Description
private void
public String
public String
public String
public String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

keyback to summary
private String key
tokenTypeback to summary
private String tokenType
tokenValueback to summary
private String tokenValue
valueback to summary
private String value

Constructor Detail

Tokenback to summary
public Token(String tokenType, String tokenValue)

Method Detail

buildKeyValueback to summary
private void buildKeyValue()
getKeyback to summary
public String getKey()
getTokenTypeback to summary
public String getTokenType()
getTokenValueback to summary
public String getTokenValue()
getValueback to summary
public String getValue()