Class ComplexResource

java.lang.Object
org.jboss.as.controller.registry.ResourceProvider.ResourceProviderRegistry
org.jboss.as.controller.registry.DelegatingResource
org.jboss.as.clustering.controller.ComplexResource
All Implemented Interfaces:
Cloneable, Function<String,ChildResourceProvider>, org.jboss.as.controller.registry.Resource

public class ComplexResource extends org.jboss.as.controller.registry.DelegatingResource implements Function<String,ChildResourceProvider>
A generic Resource decorator augmented to support additional runtime children.
Author:
Paul Ferraro
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.jboss.as.controller.registry.DelegatingResource

    org.jboss.as.controller.registry.DelegatingResource.ResourceDelegateProvider

    Nested classes/interfaces inherited from interface org.jboss.as.controller.registry.Resource

    org.jboss.as.controller.registry.Resource.Factory, org.jboss.as.controller.registry.Resource.NoSuchResourceException, org.jboss.as.controller.registry.Resource.ResourceEntry, org.jboss.as.controller.registry.Resource.Tools
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    ComplexResource(org.jboss.as.controller.registry.Resource resource, Map<String,ChildResourceProvider> providers)
    Constructs a new resource.
    protected
    ComplexResource(org.jboss.as.controller.registry.Resource resource, Map<String,ChildResourceProvider> providers, BiFunction<org.jboss.as.controller.registry.Resource,Map<String,ChildResourceProvider>,org.jboss.as.controller.registry.Resource> factory)
    Constructs a new resource.
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(String childType)
     
    org.jboss.as.controller.registry.Resource
     
    org.jboss.as.controller.registry.Resource
    getChild(org.jboss.as.controller.PathElement path)
     
    Set<org.jboss.as.controller.registry.Resource.ResourceEntry>
    getChildren(String childType)
     
     
     
    boolean
    hasChild(org.jboss.as.controller.PathElement path)
     
    boolean
    hasChildren(String childType)
     
    org.jboss.as.controller.registry.Resource
    navigate(org.jboss.as.controller.PathAddress address)
     
    org.jboss.as.controller.registry.Resource
    requireChild(org.jboss.as.controller.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 java.util.function.Function

    andThen, compose

    Methods inherited from interface org.jboss.as.controller.registry.Resource

    shallowCopy
  • Constructor Details

    • ComplexResource

      public ComplexResource(org.jboss.as.controller.registry.Resource resource, Map<String,ChildResourceProvider> providers)
      Constructs a new resource.
      Parameters:
      resource - the concrete resource
      providers - a set of providers for specific child types
    • ComplexResource

      protected ComplexResource(org.jboss.as.controller.registry.Resource resource, Map<String,ChildResourceProvider> providers, BiFunction<org.jboss.as.controller.registry.Resource,Map<String,ChildResourceProvider>,org.jboss.as.controller.registry.Resource> factory)
      Constructs a new resource.
      Parameters:
      resource - the concrete resource
      providers - a set of providers for specific child types
      factory - a function used to clone this resource
  • Method Details

    • apply

      public ChildResourceProvider apply(String childType)
      Specified by:
      apply in interface Function<String,ChildResourceProvider>
    • clone

      public org.jboss.as.controller.registry.Resource clone()
      Specified by:
      clone in interface org.jboss.as.controller.registry.Resource
      Overrides:
      clone in class org.jboss.as.controller.registry.DelegatingResource
    • getChild

      public org.jboss.as.controller.registry.Resource getChild(org.jboss.as.controller.PathElement path)
      Specified by:
      getChild in interface org.jboss.as.controller.registry.Resource
      Overrides:
      getChild in class org.jboss.as.controller.registry.DelegatingResource
    • getChildren

      public Set<org.jboss.as.controller.registry.Resource.ResourceEntry> getChildren(String childType)
      Specified by:
      getChildren in interface org.jboss.as.controller.registry.Resource
      Overrides:
      getChildren in class org.jboss.as.controller.registry.DelegatingResource
    • getChildrenNames

      public Set<String> getChildrenNames(String childType)
      Specified by:
      getChildrenNames in interface org.jboss.as.controller.registry.Resource
      Overrides:
      getChildrenNames in class org.jboss.as.controller.registry.DelegatingResource
    • getChildTypes

      public Set<String> getChildTypes()
      Specified by:
      getChildTypes in interface org.jboss.as.controller.registry.Resource
      Overrides:
      getChildTypes in class org.jboss.as.controller.registry.DelegatingResource
    • hasChild

      public boolean hasChild(org.jboss.as.controller.PathElement path)
      Specified by:
      hasChild in interface org.jboss.as.controller.registry.Resource
      Overrides:
      hasChild in class org.jboss.as.controller.registry.DelegatingResource
    • hasChildren

      public boolean hasChildren(String childType)
      Specified by:
      hasChildren in interface org.jboss.as.controller.registry.Resource
      Overrides:
      hasChildren in class org.jboss.as.controller.registry.DelegatingResource
    • requireChild

      public org.jboss.as.controller.registry.Resource requireChild(org.jboss.as.controller.PathElement path)
      Specified by:
      requireChild in interface org.jboss.as.controller.registry.Resource
      Overrides:
      requireChild in class org.jboss.as.controller.registry.DelegatingResource