Package org.infinispan.cli.resources
Class AbstractResource
java.lang.Object
org.infinispan.cli.resources.AbstractResource
- All Implemented Interfaces:
Resource
- Direct Known Subclasses:
CacheKeyResource,CacheResource,CachesResource,ClusterResource,ConfigurationsResource,ContainerResource,ContainersResource,CounterResource,CountersResource,NodeResource,RootResource,SchemasResource,ServerResource,TaskResource,TasksResource
- Since:
- 10.0
- Author:
- Tristan Tarrant <tristan@infinispan.org>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.infinispan.cli.resources.Resource
Resource.ListFormat -
Field Summary
-
Constructor Summary
Constructors -
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) booleanisLeaf()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)
-
Constructor Details
-
AbstractResource
-
-
Method Details
-
getName
Description copied from interface:ResourceReturns the name of this resource -
getParent
Description copied from interface:ResourceReturns the parent resource of this resource. This is null if the resource represents the root. -
getChildrenNames
Description copied from interface:ResourceReturns an iterable over the children of this resource- Specified by:
getChildrenNamesin interfaceResource- Throws:
IOException
-
printChildren
public void printChildren(Resource.ListFormat format, int limit, PrettyPrinter.PrettyPrintMode prettyPrintMode, org.aesh.command.shell.Shell shell) throws IOException - Specified by:
printChildrenin interfaceResource- Throws:
IOException
-
getChild
Description copied from interface:ResourceReturns a resource representing the named child- Specified by:
getChildin interfaceResource- Throws:
IOException
-
getChild
Description copied from interface:ResourceReturns a resource representing the named child- Specified by:
getChildin interfaceResource- Throws:
IOException
-
findAncestor
Description copied from interface:ResourceFinds the resource of the specified type within the ancestors of this resource- Specified by:
findAncestorin interfaceResource
-
optionalFindAncestor
Description copied from interface:ResourceFinds the resource of the specified type within the ancestors of this resource- Specified by:
optionalFindAncestorin interfaceResource
-
isLeaf
public boolean isLeaf()Description copied from interface:ResourceReturns whether this resource is a leaf resource (i.e. it has no children, or the children are not navigable) -
describe
Description copied from interface:ResourceReturns a textual representation of this resource- Specified by:
describein interfaceResource- Throws:
IOException
-
getResource
- Specified by:
getResourcein interfaceResource- Throws:
IOException
-