Class DelegatingManagementResourceRegistration
- java.lang.Object
-
- org.jboss.as.controller.registry.DelegatingManagementResourceRegistration
-
- All Implemented Interfaces:
ImmutableManagementResourceRegistration
,ManagementResourceRegistration
public class DelegatingManagementResourceRegistration extends Object implements ManagementResourceRegistration
ManagementResourceRegistration
implementation that simply delegates to anotherManagementResourceRegistration
. Intended as a convenience class to allow overriding of standard behaviors and also as a means to support a copy-on-write/publish-on-commit semantic for the management resource tree.- Author:
- Brian Stansberry (c) 2013 Red Hat Inc.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
DelegatingManagementResourceRegistration.RegistrationDelegateProvider
Provides a delegate for use by aDelegatingManagementResourceRegistration
.-
Nested classes/interfaces inherited from interface org.jboss.as.controller.registry.ManagementResourceRegistration
ManagementResourceRegistration.Factory
-
-
Field Summary
-
Fields inherited from interface org.jboss.as.controller.registry.ImmutableManagementResourceRegistration
ACCESS_PERMISSION
-
-
Constructor Summary
Constructors Constructor Description DelegatingManagementResourceRegistration(DelegatingManagementResourceRegistration.RegistrationDelegateProvider delegateProvider)
Creates a new DelegatingManagementResourceRegistration with a possibly changing delegate.DelegatingManagementResourceRegistration(ManagementResourceRegistration delegate)
Creates a new DelegatingManagementResourceRegistration with a fixed delegate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<AccessConstraintDefinition>
getAccessConstraints()
Set<RuntimePackageDependency>
getAdditionalRuntimePackages()
Returns additional packages provided by this resource.AliasEntry
getAliasEntry()
Gets the alias entry for this registration if it is an aliasAttributeAccess
getAttributeAccess(PathAddress address, String attributeName)
Gets the information on how to read from or write to the given attribute.Set<String>
getAttributeNames(PathAddress address)
Get the names of the attributes for a nodeMap<String,AttributeAccess>
getAttributes(PathAddress address)
Get the information about all attributes for a node.Set<RuntimeCapability>
getCapabilities()
Returns all capabilities provided by this resource.Set<PathElement>
getChildAddresses(PathAddress address)
Gets the set of direct child address elements under the node at the passed in PathAddressSet<String>
getChildNames(PathAddress address)
Get the names of the types of children for a nodeString
getFeature()
Set<RuntimeCapability>
getIncorporatingCapabilities()
Returns all capabilities provided by parents of this resource, to which this resource contributes.int
getMaxOccurs()
Gets the maximum number of times a resource of the type described by this registration can occur under its parent resource (or, for a root resource, the minimum number of times it can occur at all.)int
getMinOccurs()
Gets the minimum number of times a resource of the type described by this registration can occur under its parent resource (or, for a root resource, the number of times it can occur at all.)DescriptionProvider
getModelDescription(PathAddress address)
Get the model description at the given address, ornull
if none exists.Map<String,NotificationEntry>
getNotificationDescriptions(PathAddress address, boolean inherited)
Get a map of descriptions of all notifications emitted by the resources at an address.DescriptionProvider
getOperationDescription(PathAddress address, String operationName)
Get the operation description at the given address, ornull
if none exists.Map<String,OperationEntry>
getOperationDescriptions(PathAddress address, boolean inherited)
Get a map of descriptions of all operations available at an address.OperationEntry
getOperationEntry(PathAddress address, String operationName)
Get the entry representing an operation registered with the given name at the given address, ornull
if none exists.Set<OperationEntry.Flag>
getOperationFlags(PathAddress address, String operationName)
Get the special characteristic flags for the operation at the given address, ornull
if none exist.OperationStepHandler
getOperationHandler(PathAddress address, String operationName)
Get the operation handler at the given address, ornull
if none exists.Set<String>
getOrderedChildTypes()
Return the names of the child types registered to be ordered.ManagementResourceRegistration
getOverrideModel(String name)
Get a specifically named resource that overrides thiswildcard registration
by adding additional attributes, operations or child types.ImmutableManagementResourceRegistration
getParent()
Gets the registration for this resource type's parent, if there is one.PathAddress
getPathAddress()
Gets the address under which we are registered.ProcessType
getProcessType()
Gets the type of process in which this management resource type is registered.ProxyController
getProxyController(PathAddress address)
If there is a proxy controller registered under any part of the registered address it will be returned.Set<ProxyController>
getProxyControllers(PathAddress address)
Finds all proxy controllers registered at the passed in address, or at lower levels.Set<CapabilityReferenceRecorder>
getRequirements()
Returns all capability reference recorders provided by this resource.ManagementResourceRegistration
getSubModel(PathAddress address)
Get a sub model registration.boolean
isAlias()
Gets whether this resource registration is an alias to another resource.boolean
isAllowsOverride()
Gets whether this registration will always throw an exception ifManagementResourceRegistration.registerOverrideModel(String, OverrideDescriptionProvider)
is invoked.boolean
isFeature()
boolean
isOrderedChildResource()
Return @code true} if a child resource registration was registered usingManagementResourceRegistration.registerSubModel(ResourceDefinition)
, andfalse
otherwiseboolean
isRemote()
Gets whether operations against the resource represented by this registration will be proxied to a remote process.boolean
isRuntimeOnly()
Gets whether this model node only exists in the runtime and has no representation in the persistent configuration model.void
registerAdditionalRuntimePackages(RuntimePackageDependency... pkgs)
RegisterRuntimePackageDependency
additional packages.void
registerAlias(PathElement address, AliasEntry aliasEntry)
Register an alias registration to another part of the modelvoid
registerCapability(RuntimeCapability capability)
Registers passed capability on resourcevoid
registerIncorporatingCapabilities(Set<RuntimeCapability> capabilities)
Registers a set of capabilities that this resource does not directly provide but to which it contributes.void
registerMetric(AttributeDefinition definition, OperationStepHandler metricHandler)
Records that the given attribute is a metric.void
registerNotification(NotificationDefinition notification)
Record that the given notification can be emitted by this resource.void
registerNotification(NotificationDefinition notification, boolean inherited)
Record that the given notification can be emitted by this resource.void
registerOperationHandler(OperationDefinition definition, OperationStepHandler handler)
Register an operation handler for this resource.void
registerOperationHandler(OperationDefinition definition, OperationStepHandler handler, boolean inherited)
Register an operation handler for this resource.ManagementResourceRegistration
registerOverrideModel(String name, OverrideDescriptionProvider descriptionProvider)
Register a specifically named resource that overrides thiswildcard registration
by adding additional attributes, operations or child types.void
registerProxyController(PathElement address, ProxyController proxyController)
Register a proxy controller.void
registerReadOnlyAttribute(AttributeDefinition definition, OperationStepHandler readHandler)
Records that the given attribute can be read from but not written to, and optionally provides an operation handler for the read.void
registerReadWriteAttribute(AttributeDefinition definition, OperationStepHandler readHandler, OperationStepHandler writeHandler)
Records that the given attribute can be both read from and written to, and provides operation handlers for the read and the write.void
registerRequirements(Set<CapabilityReferenceRecorder> requirements)
Registers a set of CapabilityReferenceRecorder.ManagementResourceRegistration
registerSubModel(ResourceDefinition resourceDefinition)
Register the existence of an addressable sub-resource of this resource.void
unregisterAlias(PathElement address)
Unregister an aliasvoid
unregisterAttribute(String attributeName)
Remove that the given attribute if present.void
unregisterNotification(String notificationType)
Remove that the given notification can be emitted by this resource.void
unregisterOperationHandler(String operationName)
Unregister an operation handler for this resource.void
unregisterOverrideModel(String name)
Unregister a specifically named resource that overrides awildcard registration
by adding additional attributes, operations or child types.void
unregisterProxyController(PathElement address)
Unregister a proxy controllervoid
unregisterSubModel(PathElement address)
Unregister the existence of an addressable sub-resource of this resource.
-
-
-
Constructor Detail
-
DelegatingManagementResourceRegistration
public DelegatingManagementResourceRegistration(ManagementResourceRegistration delegate)
Creates a new DelegatingManagementResourceRegistration with a fixed delegate.- Parameters:
delegate
- the delegate. Cannot benull
-
DelegatingManagementResourceRegistration
public DelegatingManagementResourceRegistration(DelegatingManagementResourceRegistration.RegistrationDelegateProvider delegateProvider)
Creates a new DelegatingManagementResourceRegistration with a possibly changing delegate.- Parameters:
delegateProvider
- provider of the delegate. Cannot benull
-
-
Method Detail
-
getPathAddress
public PathAddress getPathAddress()
Description copied from interface:ImmutableManagementResourceRegistration
Gets the address under which we are registered.- Specified by:
getPathAddress
in interfaceImmutableManagementResourceRegistration
- Returns:
- the address. Will not be
null
-
getProcessType
public ProcessType getProcessType()
Description copied from interface:ImmutableManagementResourceRegistration
Gets the type of process in which this management resource type is registered.- Specified by:
getProcessType
in interfaceImmutableManagementResourceRegistration
- Returns:
- the process type. Will not return
null
-
getParent
public ImmutableManagementResourceRegistration getParent()
Description copied from interface:ImmutableManagementResourceRegistration
Gets the registration for this resource type's parent, if there is one.- Specified by:
getParent
in interfaceImmutableManagementResourceRegistration
- Returns:
- the parent, or
null
ifImmutableManagementResourceRegistration.getPathAddress()
returns an address with asize
of0
-
getMaxOccurs
public int getMaxOccurs()
Description copied from interface:ImmutableManagementResourceRegistration
Gets the maximum number of times a resource of the type described by this registration can occur under its parent resource (or, for a root resource, the minimum number of times it can occur at all.)- Specified by:
getMaxOccurs
in interfaceImmutableManagementResourceRegistration
- Returns:
- the minimum number of occurrences
-
getMinOccurs
public int getMinOccurs()
Description copied from interface:ImmutableManagementResourceRegistration
Gets the minimum number of times a resource of the type described by this registration can occur under its parent resource (or, for a root resource, the number of times it can occur at all.)- Specified by:
getMinOccurs
in interfaceImmutableManagementResourceRegistration
- Returns:
- the minimum number of occurrences
-
getFeature
public String getFeature()
- Specified by:
getFeature
in interfaceImmutableManagementResourceRegistration
-
isFeature
public boolean isFeature()
- Specified by:
isFeature
in interfaceImmutableManagementResourceRegistration
-
isRuntimeOnly
public boolean isRuntimeOnly()
Description copied from interface:ImmutableManagementResourceRegistration
Gets whether this model node only exists in the runtime and has no representation in the persistent configuration model.- Specified by:
isRuntimeOnly
in interfaceImmutableManagementResourceRegistration
- Returns:
true
if the model node has no representation in the persistent configuration model;false
otherwise
-
isRemote
public boolean isRemote()
Description copied from interface:ImmutableManagementResourceRegistration
Gets whether operations against the resource represented by this registration will be proxied to a remote process.- Specified by:
isRemote
in interfaceImmutableManagementResourceRegistration
- Returns:
true
if this registration represents a remote resource;false
otherwise
-
isAlias
public boolean isAlias()
Description copied from interface:ImmutableManagementResourceRegistration
Gets whether this resource registration is an alias to another resource.- Specified by:
isAlias
in interfaceImmutableManagementResourceRegistration
- Returns:
true
if this registration represents an alias;false
otherwise
-
getOperationEntry
public OperationEntry getOperationEntry(PathAddress address, String operationName)
Description copied from interface:ImmutableManagementResourceRegistration
Get the entry representing an operation registered with the given name at the given address, ornull
if none exists.- Specified by:
getOperationEntry
in interfaceImmutableManagementResourceRegistration
- Parameters:
address
- the address, relative to this nodeoperationName
- the operation name- Returns:
- the operation entry or
null
-
getOperationHandler
public OperationStepHandler getOperationHandler(PathAddress address, String operationName)
Description copied from interface:ImmutableManagementResourceRegistration
Get the operation handler at the given address, ornull
if none exists.- Specified by:
getOperationHandler
in interfaceImmutableManagementResourceRegistration
- Parameters:
address
- the address, relative to this nodeoperationName
- the operation name- Returns:
- the operation handler
-
getOperationDescription
public DescriptionProvider getOperationDescription(PathAddress address, String operationName)
Description copied from interface:ImmutableManagementResourceRegistration
Get the operation description at the given address, ornull
if none exists.- Specified by:
getOperationDescription
in interfaceImmutableManagementResourceRegistration
- Parameters:
address
- the address, relative to this nodeoperationName
- the operation name- Returns:
- the operation description
-
getOperationFlags
public Set<OperationEntry.Flag> getOperationFlags(PathAddress address, String operationName)
Description copied from interface:ImmutableManagementResourceRegistration
Get the special characteristic flags for the operation at the given address, ornull
if none exist.- Specified by:
getOperationFlags
in interfaceImmutableManagementResourceRegistration
- Parameters:
address
- the address, relative to this nodeoperationName
- the operation name- Returns:
- the operation entry flags or
null
-
getAttributeNames
public Set<String> getAttributeNames(PathAddress address)
Description copied from interface:ImmutableManagementResourceRegistration
Get the names of the attributes for a node- Specified by:
getAttributeNames
in interfaceImmutableManagementResourceRegistration
- Parameters:
address
- the address, relative to this node- Returns:
- the attribute names. If there are none an empty set is returned
-
getAttributeAccess
public AttributeAccess getAttributeAccess(PathAddress address, String attributeName)
Description copied from interface:ImmutableManagementResourceRegistration
Gets the information on how to read from or write to the given attribute.- Specified by:
getAttributeAccess
in interfaceImmutableManagementResourceRegistration
- Parameters:
address
- the address of the resourceattributeName
- the name of the attribute- Returns:
- the handling information, or
null
if the attribute or address is unknown
-
getAttributes
public Map<String,AttributeAccess> getAttributes(PathAddress address)
Description copied from interface:ImmutableManagementResourceRegistration
Get the information about all attributes for a node.- Specified by:
getAttributes
in interfaceImmutableManagementResourceRegistration
- Parameters:
address
- the address, relative to this node- Returns:
- the attribute information, in a map keyed by attribute name. If there are none an empty map is returned
-
getChildNames
public Set<String> getChildNames(PathAddress address)
Description copied from interface:ImmutableManagementResourceRegistration
Get the names of the types of children for a node- Specified by:
getChildNames
in interfaceImmutableManagementResourceRegistration
- Parameters:
address
- the address, relative to this node- Returns:
- the child type names. If there are none an empty set is returned
-
getChildAddresses
public Set<PathElement> getChildAddresses(PathAddress address)
Description copied from interface:ImmutableManagementResourceRegistration
Gets the set of direct child address elements under the node at the passed in PathAddress- Specified by:
getChildAddresses
in interfaceImmutableManagementResourceRegistration
- Parameters:
address
- the address we want to find children for- Returns:
- the set of direct child elements
-
getModelDescription
public DescriptionProvider getModelDescription(PathAddress address)
Description copied from interface:ImmutableManagementResourceRegistration
Get the model description at the given address, ornull
if none exists.- Specified by:
getModelDescription
in interfaceImmutableManagementResourceRegistration
- Parameters:
address
- the address, relative to this node- Returns:
- the model description
-
getOperationDescriptions
public Map<String,OperationEntry> getOperationDescriptions(PathAddress address, boolean inherited)
Description copied from interface:ImmutableManagementResourceRegistration
Get a map of descriptions of all operations available at an address.- Specified by:
getOperationDescriptions
in interfaceImmutableManagementResourceRegistration
- Parameters:
address
- the addressinherited
- true to include inherited operations- Returns:
- the operation map
-
getNotificationDescriptions
public Map<String,NotificationEntry> getNotificationDescriptions(PathAddress address, boolean inherited)
Description copied from interface:ImmutableManagementResourceRegistration
Get a map of descriptions of all notifications emitted by the resources at an address.- Specified by:
getNotificationDescriptions
in interfaceImmutableManagementResourceRegistration
- Parameters:
address
- the addressinherited
- true to include inherited notifications- Returns:
- the notifications map
-
getProxyController
public ProxyController getProxyController(PathAddress address)
Description copied from interface:ImmutableManagementResourceRegistration
If there is a proxy controller registered under any part of the registered address it will be returned. E.g. if the address passed in is[a=b,c=d,e=f]
and there is a proxy registered under[a=b,c=d]
that proxy will be returned.- Specified by:
getProxyController
in interfaceImmutableManagementResourceRegistration
- Parameters:
address
- the address to look for a proxy under- Returns:
- the found proxy controller, or
null
if there is none
-
getProxyControllers
public Set<ProxyController> getProxyControllers(PathAddress address)
Description copied from interface:ImmutableManagementResourceRegistration
Finds all proxy controllers registered at the passed in address, or at lower levels. E.g. if the address passed in isa=b
and there are proxies registered at[a=b,c=d]
,[a=b,e=f]
and[g-h]
, the proxies for[a=b,c=d]
and[a=b,e=f]
will be returned.- Specified by:
getProxyControllers
in interfaceImmutableManagementResourceRegistration
- Parameters:
address
- the address to start looking for proxies under- Returns:
- the found proxy controllers, or an empty set if there are none
-
getOverrideModel
public ManagementResourceRegistration getOverrideModel(String name)
Description copied from interface:ManagementResourceRegistration
Get a specifically named resource that overrides thiswildcard registration
by adding additional attributes, operations or child types.- Specified by:
getOverrideModel
in interfaceManagementResourceRegistration
- Parameters:
name
- the specific name of the resource. Cannot benull
orPathElement.WILDCARD_VALUE
- Returns:
- the resource registration,
null
if there is none
-
getSubModel
public ManagementResourceRegistration getSubModel(PathAddress address)
Description copied from interface:ManagementResourceRegistration
Get a sub model registration.This method overrides the superinterface method of the same name in order to require that the returned registration be mutable.
- Specified by:
getSubModel
in interfaceImmutableManagementResourceRegistration
- Specified by:
getSubModel
in interfaceManagementResourceRegistration
- Parameters:
address
- the address, relative to this node- Returns:
- the resource registration,
null
if there is none
-
registerSubModel
public ManagementResourceRegistration registerSubModel(ResourceDefinition resourceDefinition)
Description copied from interface:ManagementResourceRegistration
Register the existence of an addressable sub-resource of this resource. Before this method returns the providedresourceDefinition
will be given the opportunity toregister attributes
,register operations
, andregister notifications
- Specified by:
registerSubModel
in interfaceManagementResourceRegistration
- Parameters:
resourceDefinition
- source for descriptive information describing this portion of the model (must not benull
)- Returns:
- a resource registration which may be used to add attributes, operations, notifications and sub-models
-
unregisterSubModel
public void unregisterSubModel(PathElement address)
Description copied from interface:ManagementResourceRegistration
Unregister the existence of an addressable sub-resource of this resource.- Specified by:
unregisterSubModel
in interfaceManagementResourceRegistration
- Parameters:
address
- the child of this registry that should no longer be available
-
isAllowsOverride
public boolean isAllowsOverride()
Description copied from interface:ManagementResourceRegistration
Gets whether this registration will always throw an exception ifManagementResourceRegistration.registerOverrideModel(String, OverrideDescriptionProvider)
is invoked. An exception will always be thrown for root resource registrations,non-wildcard registrations
, orremote registrations
.- Specified by:
isAllowsOverride
in interfaceManagementResourceRegistration
- Returns:
true
if an exception will not always be thrown;false
if it will
-
registerOverrideModel
public ManagementResourceRegistration registerOverrideModel(String name, OverrideDescriptionProvider descriptionProvider)
Description copied from interface:ManagementResourceRegistration
Register a specifically named resource that overrides thiswildcard registration
by adding additional attributes, operations or child types.- Specified by:
registerOverrideModel
in interfaceManagementResourceRegistration
- Parameters:
name
- the specific name of the resource. Cannot benull
orPathElement.WILDCARD_VALUE
descriptionProvider
- provider for descriptions of the additional attributes or child types- Returns:
- a resource registration which may be used to add attributes, operations and sub-models
-
unregisterOverrideModel
public void unregisterOverrideModel(String name)
Description copied from interface:ManagementResourceRegistration
Unregister a specifically named resource that overrides awildcard registration
by adding additional attributes, operations or child types.- Specified by:
unregisterOverrideModel
in interfaceManagementResourceRegistration
- Parameters:
name
- the specific name of the resource. Cannot benull
orPathElement.WILDCARD_VALUE
-
registerOperationHandler
public void registerOperationHandler(OperationDefinition definition, OperationStepHandler handler)
Description copied from interface:ManagementResourceRegistration
Register an operation handler for this resource.- Specified by:
registerOperationHandler
in interfaceManagementResourceRegistration
- Parameters:
definition
- the definition of operationhandler
- the operation handler
-
registerOperationHandler
public void registerOperationHandler(OperationDefinition definition, OperationStepHandler handler, boolean inherited)
Description copied from interface:ManagementResourceRegistration
Register an operation handler for this resource.- Specified by:
registerOperationHandler
in interfaceManagementResourceRegistration
- Parameters:
definition
- the definition of operationhandler
- the operation handlerinherited
-true
if the operation is inherited to child nodes,false
otherwise
-
unregisterOperationHandler
public void unregisterOperationHandler(String operationName)
Description copied from interface:ManagementResourceRegistration
Unregister an operation handler for this resource.- Specified by:
unregisterOperationHandler
in interfaceManagementResourceRegistration
- Parameters:
operationName
- the operation name
-
registerReadWriteAttribute
public void registerReadWriteAttribute(AttributeDefinition definition, OperationStepHandler readHandler, OperationStepHandler writeHandler)
Description copied from interface:ManagementResourceRegistration
Records that the given attribute can be both read from and written to, and provides operation handlers for the read and the write. The attribute is assumed to beAttributeAccess.Storage.CONFIGURATION
unless parameterflags
includesAttributeAccess.Flag.STORAGE_RUNTIME
.- Specified by:
registerReadWriteAttribute
in interfaceManagementResourceRegistration
- Parameters:
definition
- the attribute definition. Cannot benull
readHandler
- the handler for attribute reads. May benull
in which case the default handling is usedwriteHandler
- the handler for attribute writes. Cannot benull
-
registerReadOnlyAttribute
public void registerReadOnlyAttribute(AttributeDefinition definition, OperationStepHandler readHandler)
Description copied from interface:ManagementResourceRegistration
Records that the given attribute can be read from but not written to, and optionally provides an operation handler for the read. The attribute is assumed to beAttributeAccess.Storage.CONFIGURATION
unless parameterflags
includesAttributeAccess.Flag.STORAGE_RUNTIME
.- Specified by:
registerReadOnlyAttribute
in interfaceManagementResourceRegistration
- Parameters:
definition
- the attribute definition. Cannot benull
readHandler
- the handler for attribute reads. May benull
in which case the default handling is used
-
registerMetric
public void registerMetric(AttributeDefinition definition, OperationStepHandler metricHandler)
Description copied from interface:ManagementResourceRegistration
Records that the given attribute is a metric.- Specified by:
registerMetric
in interfaceManagementResourceRegistration
- Parameters:
definition
- the attribute definition. Cannot benull
metricHandler
- the handler for attribute reads. Cannot benull
-
unregisterAttribute
public void unregisterAttribute(String attributeName)
Description copied from interface:ManagementResourceRegistration
Remove that the given attribute if present.- Specified by:
unregisterAttribute
in interfaceManagementResourceRegistration
- Parameters:
attributeName
- the name of the attribute. Cannot benull
-
registerNotification
public void registerNotification(NotificationDefinition notification, boolean inherited)
Description copied from interface:ManagementResourceRegistration
Record that the given notification can be emitted by this resource.- Specified by:
registerNotification
in interfaceManagementResourceRegistration
- Parameters:
notification
- the definition of the notification. Cannot benull
inherited
-true
if the notification is inherited to child nodes,false
otherwise
-
registerNotification
public void registerNotification(NotificationDefinition notification)
Description copied from interface:ManagementResourceRegistration
Record that the given notification can be emitted by this resource. The notification is not inherited by child nodes.- Specified by:
registerNotification
in interfaceManagementResourceRegistration
- Parameters:
notification
- the definition of the notification. Cannot benull
-
unregisterNotification
public void unregisterNotification(String notificationType)
Description copied from interface:ManagementResourceRegistration
Remove that the given notification can be emitted by this resource.- Specified by:
unregisterNotification
in interfaceManagementResourceRegistration
- Parameters:
notificationType
- the type of the notification. Cannot benull
-
registerProxyController
public void registerProxyController(PathElement address, ProxyController proxyController)
Description copied from interface:ManagementResourceRegistration
Register a proxy controller.- Specified by:
registerProxyController
in interfaceManagementResourceRegistration
- Parameters:
address
- the child of this registry that should be proxiedproxyController
- the proxy controller
-
unregisterProxyController
public void unregisterProxyController(PathElement address)
Description copied from interface:ManagementResourceRegistration
Unregister a proxy controller- Specified by:
unregisterProxyController
in interfaceManagementResourceRegistration
- Parameters:
address
- the child of this registry that should no longer be proxied
-
registerAlias
public void registerAlias(PathElement address, AliasEntry aliasEntry)
Description copied from interface:ManagementResourceRegistration
Register an alias registration to another part of the model- Specified by:
registerAlias
in interfaceManagementResourceRegistration
- Parameters:
address
- the child of this registry that is an aliasaliasEntry
- the target model
-
unregisterAlias
public void unregisterAlias(PathElement address)
Description copied from interface:ManagementResourceRegistration
Unregister an alias- Specified by:
unregisterAlias
in interfaceManagementResourceRegistration
- Parameters:
address
- the child of this registry that is an alias
-
getAccessConstraints
public List<AccessConstraintDefinition> getAccessConstraints()
- Specified by:
getAccessConstraints
in interfaceImmutableManagementResourceRegistration
-
getAliasEntry
public AliasEntry getAliasEntry()
Description copied from interface:ImmutableManagementResourceRegistration
Gets the alias entry for this registration if it is an alias- Specified by:
getAliasEntry
in interfaceImmutableManagementResourceRegistration
- Returns:
- the alias entry if this registration represents an aliased resource;
null
otherwise
-
getOrderedChildTypes
public Set<String> getOrderedChildTypes()
Description copied from interface:ImmutableManagementResourceRegistration
Return the names of the child types registered to be ordered.- Specified by:
getOrderedChildTypes
in interfaceImmutableManagementResourceRegistration
- Returns:
- the set of ordered child types, and and empty set if there are none
-
isOrderedChildResource
public boolean isOrderedChildResource()
Description copied from interface:ImmutableManagementResourceRegistration
Return @code true} if a child resource registration was registered usingManagementResourceRegistration.registerSubModel(ResourceDefinition)
, andfalse
otherwise- Specified by:
isOrderedChildResource
in interfaceImmutableManagementResourceRegistration
- Returns:
- whether this is an ordered child or not
-
registerCapability
public void registerCapability(RuntimeCapability capability)
Description copied from interface:ManagementResourceRegistration
Registers passed capability on resource- Specified by:
registerCapability
in interfaceManagementResourceRegistration
- Parameters:
capability
- a capability to register
-
registerIncorporatingCapabilities
public void registerIncorporatingCapabilities(Set<RuntimeCapability> capabilities)
Description copied from interface:ManagementResourceRegistration
Registers a set of capabilities that this resource does not directly provide but to which it contributes. This will only include capabilities for which this resource does not control theregistration of the capability
. Any capabilities registered by this resource will instead be included in the return value forImmutableManagementResourceRegistration.getCapabilities()
.Use of this method is only necessary if the caller wishes to specifically record capability incorporation, instead of relying on the default resolution mechanism detailed in
ImmutableManagementResourceRegistration.getIncorporatingCapabilities()
, or if it wishes disable the default resolution mechanism and specifically declare that this resource does not contribute to parent capabilities. It does the latter by passing an empty set as thecapabilities
parameter. Passing an empty set is not necessary if this resource itself directlyprovides a capability
, as it is the contract ofImmutableManagementResourceRegistration.getIncorporatingCapabilities()
that in that case it must return an empty set.- Specified by:
registerIncorporatingCapabilities
in interfaceManagementResourceRegistration
- Parameters:
capabilities
- set of capabilities, ornull
if default resolution of capabilities to which this resource contributes should be used; an empty set can be used to indicate this resource does not contribute to capabilities provided by its parent
-
registerRequirements
public void registerRequirements(Set<CapabilityReferenceRecorder> requirements)
Description copied from interface:ManagementResourceRegistration
Registers a set of CapabilityReferenceRecorder. Each recorder is a link between acapability requirement and the resource capability requiring it.- Specified by:
registerRequirements
in interfaceManagementResourceRegistration
- Parameters:
requirements
- a set of CapabilityReferenceRecorder.
-
getCapabilities
public Set<RuntimeCapability> getCapabilities()
Description copied from interface:ImmutableManagementResourceRegistration
Returns all capabilities provided by this resource. This will only include capabilities for which this resource controls the registration of the capability. If any children of this resource are involved in providing the capability, the registration for the children must not include the capability in the value they return from this method.- Specified by:
getCapabilities
in interfaceImmutableManagementResourceRegistration
- Returns:
- Set of capabilities if any registered otherwise an empty set
- See Also:
ImmutableManagementResourceRegistration.getIncorporatingCapabilities()
-
getIncorporatingCapabilities
public Set<RuntimeCapability> getIncorporatingCapabilities()
Description copied from interface:ImmutableManagementResourceRegistration
Returns all capabilities provided by parents of this resource, to which this resource contributes. This will only include capabilities for which this resource does not control the registration of the capability. Any capabilities registered by this resource will instead be included in the return value forImmutableManagementResourceRegistration.getCapabilities()
.Often, this method will return
null
, which has a special meaning. Anull
value means this resource contributes to any capabilities provided by resources higher in its branch of the resource tree, with the search for such capabilities continuing through ancestor resources until:- The ancestor has registered a capability; i.e. once a capability is identified, higher levels are not searched
- The ancestor returns a non-null value from this method; i.e. once an ancestor declares an incorporating capability or that there are no incorporating capabilities, higher levels are not searched
- The ancestor is a root resource. Child resources do not contribute to root capabilities unless they specifically declare they do so
- The ancestor has single element address whose key is
host
. Child resources do not contribute to host root capabilities unless they specifically declare they do so - For subsystem resources, the ancestor resource is not provided by the subsystem. Subsystem resources do not contribute to capabilities provided by the kernel
A non-
null
value indicates no search of parent resources for capabilities should be performed, and only those capabilities included in the return set should be considered as incorporating this resource (or none at all if the return set is empty.)An instance of this interface that returns a non-empty set from
ImmutableManagementResourceRegistration.getCapabilities()
must not returnnull
from this method. If a resource itself provides a capability but also contributes to a different capability provided by a parent, that relationship must be specifically noted in the return value from this method.Note that providing a capability that is in turn a requirement of a parent resource's capability is not the kind of "contributing" to the parent resource's capability that is being considered here. The relationship between a capability and its requirements is separately tracked by the
RuntimeCapability
itself. A typical "contributing" resource would be one that represents a chunk of configuration directly used by the parent resource's capability.- Specified by:
getIncorporatingCapabilities
in interfaceImmutableManagementResourceRegistration
- Returns:
- set of capabilities, or
null
if default resolution of capabilities to which this resource contributes should be used; an empty set can be used to indicate this resource does not contribute to capabilities provided by its parent. Will not returnnull
ifImmutableManagementResourceRegistration.getCapabilities()
returns a non-empty set. - See Also:
ImmutableManagementResourceRegistration.getCapabilities()
-
getRequirements
public Set<CapabilityReferenceRecorder> getRequirements()
Description copied from interface:ImmutableManagementResourceRegistration
Returns all capability reference recorders provided by this resource.- Specified by:
getRequirements
in interfaceImmutableManagementResourceRegistration
- Returns:
- Set of CapabilityReferenceRecorder if any registered otherwise an empty set.
-
registerAdditionalRuntimePackages
public void registerAdditionalRuntimePackages(RuntimePackageDependency... pkgs)
Description copied from interface:ManagementResourceRegistration
RegisterRuntimePackageDependency
additional packages.- Specified by:
registerAdditionalRuntimePackages
in interfaceManagementResourceRegistration
- Parameters:
pkgs
- The packages.
-
getAdditionalRuntimePackages
public Set<RuntimePackageDependency> getAdditionalRuntimePackages()
Description copied from interface:ImmutableManagementResourceRegistration
Returns additional packages provided by this resource.- Specified by:
getAdditionalRuntimePackages
in interfaceImmutableManagementResourceRegistration
- Returns:
- Set of
RuntimePackageDependency
if any registered otherwise an empty set.
-
-