Package org.wildfly.subsystem.resource
Class DynamicResource
- java.lang.Object
-
- org.jboss.as.controller.registry.ResourceProvider.ResourceProviderRegistry
-
- org.jboss.as.controller.registry.DelegatingResource
-
- org.wildfly.subsystem.resource.DynamicResource
-
- All Implemented Interfaces:
Cloneable,Function<String,ChildResourceProvider>,Resource
public class DynamicResource extends DelegatingResource implements Function<String,ChildResourceProvider>
A genericResourcedecorator augmented to support additional runtime children.- Author:
- Paul Ferraro
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jboss.as.controller.registry.DelegatingResource
DelegatingResource.ResourceDelegateProvider
-
Nested classes/interfaces inherited from interface org.jboss.as.controller.registry.Resource
Resource.Factory, Resource.NoSuchResourceException, Resource.ResourceEntry, Resource.Tools
-
-
Constructor Summary
Constructors Modifier Constructor Description DynamicResource(Resource resource, Map<String,ChildResourceProvider> providers)Constructs a new resource.protectedDynamicResource(Resource resource, Map<String,ChildResourceProvider> providers, BiFunction<Resource,Map<String,ChildResourceProvider>,Resource> factory)Constructs a new resource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChildResourceProviderapply(String childType)Resourceclone()ResourcegetChild(PathElement path)Set<Resource.ResourceEntry>getChildren(String childType)Set<String>getChildrenNames(String childType)Set<String>getChildTypes()booleanhasChild(PathElement path)booleanhasChildren(String childType)Resourcenavigate(PathAddress address)ResourcerequireChild(PathElement path)-
Methods inherited from class org.jboss.as.controller.registry.DelegatingResource
getModel, getOrderedChildTypes, isModelDefined, isProxy, isRuntime, registerChild, registerChild, registerResourceProvider, removeChild, writeModel
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.as.controller.registry.Resource
shallowCopy
-
-
-
-
Constructor Detail
-
DynamicResource
public DynamicResource(Resource resource, Map<String,ChildResourceProvider> providers)
Constructs a new resource.- Parameters:
resource- the concrete resourceproviders- a set of providers for specific child types
-
DynamicResource
protected DynamicResource(Resource resource, Map<String,ChildResourceProvider> providers, BiFunction<Resource,Map<String,ChildResourceProvider>,Resource> factory)
Constructs a new resource.- Parameters:
resource- the concrete resourceproviders- a set of providers for specific child typesfactory- a function used to clone this resource
-
-
Method Detail
-
apply
public ChildResourceProvider apply(String childType)
- Specified by:
applyin interfaceFunction<String,ChildResourceProvider>
-
clone
public Resource clone()
- Specified by:
clonein interfaceResource- Overrides:
clonein classDelegatingResource
-
getChild
public Resource getChild(PathElement path)
- Specified by:
getChildin interfaceResource- Overrides:
getChildin classDelegatingResource
-
getChildren
public Set<Resource.ResourceEntry> getChildren(String childType)
- Specified by:
getChildrenin interfaceResource- Overrides:
getChildrenin classDelegatingResource
-
getChildrenNames
public Set<String> getChildrenNames(String childType)
- Specified by:
getChildrenNamesin interfaceResource- Overrides:
getChildrenNamesin classDelegatingResource
-
getChildTypes
public Set<String> getChildTypes()
- Specified by:
getChildTypesin interfaceResource- Overrides:
getChildTypesin classDelegatingResource
-
hasChild
public boolean hasChild(PathElement path)
- Specified by:
hasChildin interfaceResource- Overrides:
hasChildin classDelegatingResource
-
hasChildren
public boolean hasChildren(String childType)
- Specified by:
hasChildrenin interfaceResource- Overrides:
hasChildrenin classDelegatingResource
-
navigate
public Resource navigate(PathAddress address)
- Specified by:
navigatein interfaceResource- Overrides:
navigatein classDelegatingResource
-
requireChild
public Resource requireChild(PathElement path)
- Specified by:
requireChildin interfaceResource- Overrides:
requireChildin classDelegatingResource
-
-