Package org.infinispan.cli.resources
Interface Resource
- All Known Implementing Classes:
AbstractResource,CacheKeyResource,CacheResource,CachesResource,ClusterResource,ConfigurationsResource,ContainerResource,ContainersResource,CounterResource,CountersResource,NodeResource,RootResource,SchemasResource,ServerResource,TaskResource,TasksResource
public interface Resource
- Since:
- 10.0
- Author:
- Tristan Tarrant <tristan@infinispan.org>
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondescribe()Returns a textual representation of this resource<T extends Resource>
TfindAncestor(Class<T> resourceClass) Finds the resource of the specified type within the ancestors of this resourceReturns a resource representing the named childReturns a resource representing the named childReturns an iterable over the children of this resourcegetName()Returns the name of this resourceReturns the parent resource of this resource.getResource(String path) static ResourcegetRootResource(Connection connection) Returns a root resource configured against the supplied configurationbooleanisLeaf()Returns whether this resource is a leaf resource (i.e.optionalFindAncestor(Class<T> resourceClass) Finds the resource of the specified type within the ancestors of this resourcevoidprintChildren(Resource.ListFormat format, int limit, PrettyPrinter.PrettyPrintMode prettyPrintMode, org.aesh.command.shell.Shell shell)
-
Field Details
-
THIS
- See Also:
-
PARENT
- See Also:
-
-
Method Details
-
getName
String getName()Returns the name of this resource -
getParent
Resource getParent()Returns the parent resource of this resource. This is null if the resource represents the root. -
getChildrenNames
Returns an iterable over the children of this resource- Throws:
IOException
-
printChildren
void printChildren(Resource.ListFormat format, int limit, PrettyPrinter.PrettyPrintMode prettyPrintMode, org.aesh.command.shell.Shell shell) throws IOException - Throws:
IOException
-
getChild
Returns a resource representing the named child- Throws:
IOException
-
getChild
Returns a resource representing the named child- Throws:
IOException
-
findAncestor
Finds the resource of the specified type within the ancestors of this resource -
optionalFindAncestor
Finds the resource of the specified type within the ancestors of this resource -
isLeaf
boolean isLeaf()Returns whether this resource is a leaf resource (i.e. it has no children, or the children are not navigable) -
describe
Returns a textual representation of this resource- Throws:
IOException
-
getRootResource
Returns a root resource configured against the supplied configuration -
getResource
- Throws:
IOException
-