Interface TreeNode
- All Superinterfaces:
TreeElement
TreeNode maintains all the Runtime Monitoring Data
- Author:
- Harpreet Singh
-
Method Summary
Modifier and TypeMethodDescriptionReturns all nodes that match the given Regex pattern as specified by the Pattern class.getPossibleParentNode(String pattern) Get the "parent" matching the given pattern.booleanbooleanvoidremoveChild(TreeNode oldChild) voidsetCategory(String category) voidsetDescription(String description) voidsetEnabled(boolean enabled) voidtraverse(boolean ignoreDisabled) Performs a depth first traversal of the tree.Methods inherited from interface org.glassfish.flashlight.datatree.TreeElement
getName, getValue, setName
-
Method Details
-
getCategory
String getCategory() -
setCategory
-
isEnabled
boolean isEnabled() -
setEnabled
void setEnabled(boolean enabled) -
setDescription
-
getDescription
String getDescription() -
addChild
-
removeChild
-
setParent
-
getParent
TreeNode getParent() -
getCompletePathName
String getCompletePathName()- Returns:
- complete dotted name to this node
-
hasChildNodes
boolean hasChildNodes() -
getChildNodes
Collection<TreeNode> getChildNodes()- Returns:
- Collection
collection of children
-
getEnabledChildNodes
Collection<TreeNode> getEnabledChildNodes()- Returns:
- Collection
collection of children
-
getNode
- Parameters:
completeName- dotted name to the node- Returns:
- TreeNode uniquely identified tree node. Null if no matching tree node.
-
traverse
Performs a depth first traversal of the tree. Returns all the nodes in the tree unless ignoreDisabled flag is turned on.- Parameters:
ignoreDisabled- will ignore a disabled node and its children- Returns:
- List
lists all nodes under the current sub tree.
-
getNodes
Returns all nodes that match the given Regex pattern as specified by the Pattern class. Admin CLI in GlassFish v2 did not use Pattern's specified in java.util.Pattern. It had a simpler mechanism where * was equivalent to .* from Pattern If the V2Compatible flag is turned on, then the pattern is considered a v2 pattern.- Parameters:
pattern- Find a node that matches the pattern. By default pattern should follow the conventions outlined by the java.util.regex.Pattern class.ignoreDisabled- will ignore a disabled node and its childrengfv2Compatible- in this mode, * has the same meaning as .* in the Pattern class. The implementation should consider pattern as a v2 pattern.- Returns:
-
getNodes
-
getChild
-
getPossibleParentNode
Get the "parent" matching the given pattern. E.g "server.jvm.memory.maxheapsize-count" is the parent of "server.jvm.memory.maxheapsize-count-count" Note that in V3 the latter will NOT be found with getNodes()- Parameters:
pattern- Find a node that matches the pattern. By default pattern should follow the conventions outlined by the java.util.regex.Pattern class.- Returns:
- The parent node if found otherwise null.
-