public class RootPlatformMBeanResource extends Object
Resource.Factory, Resource.NoSuchResourceException, Resource.ResourceEntry, Resource.Tools
Constructor and Description |
---|
RootPlatformMBeanResource() |
Modifier and Type | Method and Description |
---|---|
Resource |
clone() |
Resource |
getChild(PathElement element)
Get a single child of this resource with the given address.
|
Set<Resource.ResourceEntry> |
getChildren(String childType)
Get the children for a given type.
|
Set<String> |
getChildrenNames(String childType)
Get the children names for a given type.
|
Set<String> |
getChildTypes()
Get a list of registered child types for this resource.
|
org.jboss.dmr.ModelNode |
getModel()
Get the local model.
|
String |
getName()
Get the name this resource was registered under.
|
Set<String> |
getOrderedChildTypes()
Return the child types for which the order matters.
|
PathElement |
getPathElement()
Get the path element this resource was registered under.
|
boolean |
hasChild(PathElement element)
Determine whether this resource has a child with the given address.
|
boolean |
hasChildren(String childType)
Determine whether this resource has any child of a given type.
|
boolean |
isModelDefined()
Determine whether the model of this resource is defined.
|
boolean |
isProxy() |
boolean |
isRuntime() |
Resource |
navigate(PathAddress address)
Navigate the resource tree.
|
void |
registerChild(PathElement address,
int index,
Resource resource)
Register a child resource
|
void |
registerChild(PathElement address,
Resource resource)
Register a child resource.
|
Resource |
removeChild(PathElement address)
Remove a child resource.
|
Resource |
requireChild(PathElement address)
Get a single child of this resource with the given address.
|
void |
writeModel(org.jboss.dmr.ModelNode newModel)
Write the model.
|
public Set<String> getChildTypes()
Resource
public org.jboss.dmr.ModelNode getModel()
Resource
public void writeModel(org.jboss.dmr.ModelNode newModel)
Resource
writeModel
in interface Resource
newModel
- the new modelpublic boolean isModelDefined()
Resource
isModelDefined
in interface Resource
true
if the local model is definedpublic Resource getChild(PathElement element)
Resource
null
.public Resource requireChild(PathElement address)
Resource
requireChild
in interface Resource
address
- the path elementpublic Resource navigate(PathAddress address)
Resource
public Set<Resource.ResourceEntry> getChildren(String childType)
Resource
getChildren
in interface Resource
childType
- the child typepublic boolean hasChildren(String childType)
Resource
hasChildren
in interface Resource
childType
- the child typetrue
if there is any child of the given typepublic boolean hasChild(PathElement element)
Resource
PathElement
has
a wildcard as value, it will determine whether this resource has any resources of a given type.public Set<String> getChildrenNames(String childType)
Resource
getChildrenNames
in interface Resource
childType
- the child typepublic void registerChild(PathElement address, Resource resource)
Resource
registerChild
in interface Resource
address
- the addressresource
- the resourcepublic void registerChild(PathElement address, int index, Resource resource)
Resource
registerChild
in interface Resource
address
- the addressindex
- the index at which to add the resource. Existing children with this index and higher will be shifted one uoresource
- the resourcepublic Resource removeChild(PathElement address)
Resource
removeChild
in interface Resource
address
- the addresspublic Resource clone()
public String getName()
Resource.ResourceEntry
getName
in interface Resource.ResourceEntry
public PathElement getPathElement()
Resource.ResourceEntry
getPathElement
in interface Resource.ResourceEntry
public Set<String> getOrderedChildTypes()
Resource
getOrderedChildTypes
in interface Resource
true
if the order of the children matters. If there are no ordered
children and empty set is returned. This method should never return null
Copyright © 2023 JBoss by Red Hat. All rights reserved.