Interface ManagementResourceRegistration
- All Superinterfaces:
FeatureFilter,FeatureRegistry,ImmutableManagementResourceRegistration
- All Known Implementing Classes:
DelegatingManagementResourceRegistration
- Author:
- David M. Lloyd
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classA factory for creating a new, root model node registration. -
Field Summary
Fields inherited from interface org.jboss.as.controller.registry.ImmutableManagementResourceRegistration
ACCESS_PERMISSION -
Method Summary
Modifier and TypeMethodDescriptiongetOverrideModel(String name) Get a specifically named resource that overrides thiswildcard registrationby adding additional attributes, operations or child types.getSubModel(PathAddress address) Get a sub model registration.booleanGets whether this registration will always throw an exception ifregisterOverrideModel(String, OverrideDescriptionProvider)is invoked.voidRegisterRuntimePackageDependencyadditional packages.voidregisterAlias(PathElement address, AliasEntry aliasEntry) Register an alias registration to another part of the modeldefault voidregisterAlias(ResourceRegistration registration, AliasEntry aliasEntry) Register an alias registration to another part of the modelvoidregisterCapability(RuntimeCapability capability) Registers passed capability on resourcevoidregisterIncorporatingCapabilities(Set<RuntimeCapability> capabilities) Registers a set of capabilities that this resource does not directly provide but to which it contributes.voidregisterMetric(AttributeDefinition definition, OperationStepHandler metricHandler) Records that the given attribute is a metric.voidregisterNotification(NotificationDefinition notification) Record that the given notification can be emitted by this resource.voidregisterNotification(NotificationDefinition notification, boolean inherited) Record that the given notification can be emitted by this resource.voidregisterOperationHandler(OperationDefinition definition, OperationStepHandler handler) Register an operation handler for this resource.voidregisterOperationHandler(OperationDefinition definition, OperationStepHandler handler, boolean inherited) Register an operation handler for this resource.registerOverrideModel(String name, OverrideDescriptionProvider descriptionProvider) Register a specifically named resource that overrides thiswildcard registrationby adding additional attributes, operations or child types.default ManagementResourceRegistrationregisterOverrideModel(ResourceRegistration registration, OverrideDescriptionProvider descriptionProvider) Register a specifically named resource that overrides thiswildcard registrationby adding additional attributes, operations or child types.voidregisterProxyController(PathElement address, ProxyController proxyController) Register a proxy controller.voidregisterReadOnlyAttribute(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.voidregisterReadWriteAttribute(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.voidregisterRequirements(Set<? extends CapabilityReferenceRecorder> requirements) Registers a set of CapabilityReferenceRecorder.registerSubModel(ResourceDefinition resourceDefinition) Register the existence of an addressable sub-resource of this resource.voidunregisterAlias(PathElement address) Unregister an aliasvoidunregisterAttribute(String attributeName) Remove that the given attribute if present.voidunregisterNotification(String notificationType) Remove that the given notification can be emitted by this resource.voidunregisterOperationHandler(String operationName) Unregister an operation handler for this resource.voidUnregister a specifically named resource that overrides awildcard registrationby adding additional attributes, operations or child types.voidunregisterProxyController(PathElement address) Unregister a proxy controllervoidunregisterSubModel(PathElement address) Unregister the existence of an addressable sub-resource of this resource.Methods inherited from interface org.jboss.as.controller.FeatureRegistry
enables, getStabilityMethods inherited from interface org.jboss.as.controller.registry.ImmutableManagementResourceRegistration
getAccessConstraints, getAdditionalRuntimePackages, getAliasEntry, getAttributeAccess, getAttributeNames, getAttributes, getCapabilities, getChildAddresses, getChildNames, getFeature, getIncorporatingCapabilities, getMaxOccurs, getMinOccurs, getModelDescription, getNotificationDescriptions, getOperationDescription, getOperationDescriptions, getOperationEntry, getOperationFlags, getOperationHandler, getOrderedChildTypes, getParent, getPathAddress, getProcessType, getProxyController, getProxyControllers, getRequirements, isAlias, isFeature, isOrderedChildResource, isRemote, isRuntimeOnly
-
Method Details
-
getOverrideModel
Get a specifically named resource that overrides thiswildcard registrationby adding additional attributes, operations or child types.- Parameters:
name- the specific name of the resource. Cannot benullorPathElement.WILDCARD_VALUE- Returns:
- the resource registration,
nullif there is none - Throws:
SecurityException- if the caller does not haveImmutableManagementResourceRegistration.ACCESS_PERMISSION
-
getSubModel
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:
getSubModelin interfaceImmutableManagementResourceRegistration- Parameters:
address- the address, relative to this node- Returns:
- the resource registration,
nullif there is none - Throws:
SecurityException- if the caller does not haveImmutableManagementResourceRegistration.ACCESS_PERMISSION
-
registerSubModel
Register the existence of an addressable sub-resource of this resource. Before this method returns the providedresourceDefinitionwill be given the opportunity toregister attributes,register operations, andregister notifications- 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, or null, if this resource definition is not enabled by the current stability level.
- Throws:
IllegalArgumentException- if a submodel is already registered ataddressIllegalStateException- ifImmutableManagementResourceRegistration.isRuntimeOnly()returnstrueSecurityException- if the caller does not haveImmutableManagementResourceRegistration.ACCESS_PERMISSION
-
unregisterSubModel
Unregister the existence of an addressable sub-resource of this resource.- Parameters:
address- the child of this registry that should no longer be available- Throws:
SecurityException- if the caller does not haveImmutableManagementResourceRegistration.ACCESS_PERMISSION
-
isAllowsOverride
boolean isAllowsOverride()Gets whether this registration will always throw an exception ifregisterOverrideModel(String, OverrideDescriptionProvider)is invoked. An exception will always be thrown for root resource registrations,non-wildcard registrations, orremote registrations.- Returns:
trueif an exception will not always be thrown;falseif it will- Throws:
SecurityException- if the caller does not haveImmutableManagementResourceRegistration.ACCESS_PERMISSION
-
registerOverrideModel
ManagementResourceRegistration registerOverrideModel(String name, OverrideDescriptionProvider descriptionProvider) Register a specifically named resource that overrides thiswildcard registrationby adding additional attributes, operations or child types.- Parameters:
name- the specific name of the resource. Cannot benullorPathElement.WILDCARD_VALUEdescriptionProvider- 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.
- Throws:
IllegalArgumentException- if either parameter is null or if there is already a registration undernameIllegalStateException- ifImmutableManagementResourceRegistration.isRuntimeOnly()returnstrueor ifisAllowsOverride()returns falseSecurityException- if the caller does not haveImmutableManagementResourceRegistration.ACCESS_PERMISSION
-
registerOverrideModel
default ManagementResourceRegistration registerOverrideModel(ResourceRegistration registration, OverrideDescriptionProvider descriptionProvider) Register a specifically named resource that overrides thiswildcard registrationby adding additional attributes, operations or child types.- Parameters:
registration- the child registration of this registry that should no longer be availabledescriptionProvider- 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, or null, if this resource definition is not enabled by the current stability level.
- Throws:
IllegalArgumentException- if either parameter is null or if there is already a registration undernameIllegalStateException- ifImmutableManagementResourceRegistration.isRuntimeOnly()returnstrueor ifisAllowsOverride()returns falseSecurityException- if the caller does not haveImmutableManagementResourceRegistration.ACCESS_PERMISSION
-
unregisterOverrideModel
Unregister a specifically named resource that overrides awildcard registrationby adding additional attributes, operations or child types.- Parameters:
name- the specific name of the resource. Cannot benullorPathElement.WILDCARD_VALUE- Throws:
SecurityException- if the caller does not haveImmutableManagementResourceRegistration.ACCESS_PERMISSION
-
registerOperationHandler
Register an operation handler for this resource.- Parameters:
definition- the definition of operationhandler- the operation handler- Throws:
SecurityException- if the caller does not haveImmutableManagementResourceRegistration.ACCESS_PERMISSION
-
registerOperationHandler
void registerOperationHandler(OperationDefinition definition, OperationStepHandler handler, boolean inherited) Register an operation handler for this resource.- Parameters:
definition- the definition of operationhandler- the operation handlerinherited-trueif the operation is inherited to child nodes,falseotherwise- Throws:
SecurityException- if the caller does not haveImmutableManagementResourceRegistration.ACCESS_PERMISSION
-
unregisterOperationHandler
Unregister an operation handler for this resource.- Parameters:
operationName- the operation name- Throws:
IllegalArgumentException- if operationName is not registeredSecurityException- if the caller does not haveImmutableManagementResourceRegistration.ACCESS_PERMISSION
-
registerReadWriteAttribute
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. The attribute is assumed to beAttributeAccess.Storage.CONFIGURATIONunless parameterflagsincludesAttributeAccess.Flag.STORAGE_RUNTIME.- Parameters:
definition- the attribute definition. Cannot benullreadHandler- the handler for attribute reads. May benullin which case the default handling is usedwriteHandler- the handler for attribute writes. Cannot benull- Throws:
IllegalArgumentException- ifdefinitionorwriteHandlerarenullSecurityException- if the caller does not haveImmutableManagementResourceRegistration.ACCESS_PERMISSION
-
registerReadOnlyAttribute
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.CONFIGURATIONunless parameterflagsincludesAttributeAccess.Flag.STORAGE_RUNTIME.- Parameters:
definition- the attribute definition. Cannot benullreadHandler- the handler for attribute reads. May benullin which case the default handling is used- Throws:
IllegalArgumentException- ifdefinitionisnullSecurityException- if the caller does not haveImmutableManagementResourceRegistration.ACCESS_PERMISSION
-
registerMetric
Records that the given attribute is a metric.- Parameters:
definition- the attribute definition. Cannot benullmetricHandler- the handler for attribute reads. Cannot benull- Throws:
IllegalArgumentException- ifdefinitionormetricHandlerarenullSecurityException- if the caller does not haveImmutableManagementResourceRegistration.ACCESS_PERMISSION
-
unregisterAttribute
Remove that the given attribute if present.- Parameters:
attributeName- the name of the attribute. Cannot benull- Throws:
SecurityException- if the caller does not haveImmutableManagementResourceRegistration.ACCESS_PERMISSION
-
registerProxyController
Register a proxy controller.- Parameters:
address- the child of this registry that should be proxiedproxyController- the proxy controller- Throws:
SecurityException- if the caller does not haveImmutableManagementResourceRegistration.ACCESS_PERMISSION
-
unregisterProxyController
Unregister a proxy controller- Parameters:
address- the child of this registry that should no longer be proxied- Throws:
SecurityException- if the caller does not haveImmutableManagementResourceRegistration.ACCESS_PERMISSION
-
registerAlias
Register an alias registration to another part of the model- Parameters:
address- the child of this registry that is an aliasaliasEntry- the target model- Throws:
SecurityException- if the caller does not haveImmutableManagementResourceRegistration.ACCESS_PERMISSION
-
registerAlias
Register an alias registration to another part of the model- Parameters:
registration- the registration of the child of this registry that is an aliasaliasEntry- the target model- Throws:
SecurityException- if the caller does not haveImmutableManagementResourceRegistration.ACCESS_PERMISSION
-
unregisterAlias
Unregister an alias- Parameters:
address- the child of this registry that is an alias- Throws:
SecurityException- if the caller does not haveImmutableManagementResourceRegistration.ACCESS_PERMISSION
-
registerNotification
Record that the given notification can be emitted by this resource.- Parameters:
notification- the definition of the notification. Cannot benullinherited-trueif the notification is inherited to child nodes,falseotherwise- Throws:
IllegalArgumentException- ifnotificationisnullSecurityException- if the caller does not haveImmutableManagementResourceRegistration.ACCESS_PERMISSION
-
registerNotification
Record that the given notification can be emitted by this resource. The notification is not inherited by child nodes.- Parameters:
notification- the definition of the notification. Cannot benull- Throws:
IllegalArgumentException- ifnotificationTypeornotificationEntryisnullSecurityException- if the caller does not haveImmutableManagementResourceRegistration.ACCESS_PERMISSION
-
unregisterNotification
Remove that the given notification can be emitted by this resource.- Parameters:
notificationType- the type of the notification. Cannot benull- Throws:
SecurityException- if the caller does not haveImmutableManagementResourceRegistration.ACCESS_PERMISSION
-
registerCapability
Registers passed capability on resource- Parameters:
capability- a capability to register
-
registerIncorporatingCapabilities
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 thecapabilitiesparameter. 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.- Parameters:
capabilities- set of capabilities, ornullif 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
Registers a set of CapabilityReferenceRecorder. Each recorder is a link between acapability requirement and the resource capability requiring it.- Parameters:
requirements- a set of CapabilityReferenceRecorder.
-
registerAdditionalRuntimePackages
RegisterRuntimePackageDependencyadditional packages.- Parameters:
pkgs- The packages.
-