public interface ManagementResourceRegistration extends ImmutableManagementResourceRegistration
Modifier and Type | Interface and Description |
---|---|
static class |
ManagementResourceRegistration.Factory
A factory for creating a new, root model node registration.
|
ACCESS_PERMISSION
Modifier and Type | Method and Description |
---|---|
ManagementResourceRegistration |
getOverrideModel(String name)
Get a specifically named resource that overrides this
wildcard registration
by adding additional attributes, operations or child types. |
ManagementResourceRegistration |
getSubModel(PathAddress address)
Get a sub model registration.
|
boolean |
isAllowsOverride()
Gets whether this registration will always throw an exception if
registerOverrideModel(String, OverrideDescriptionProvider) is invoked. |
void |
registerAlias(PathElement address,
AliasEntry aliasEntry)
Register an alias registration to another part of the model
|
void |
registerCapability(RuntimeCapability capability)
Registers passed capability on resource
|
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 this
wildcard 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.
|
ManagementResourceRegistration |
registerSubModel(ResourceDefinition resourceDefinition)
Register the existence of an addressable sub-resource of this resource.
|
void |
setRuntimeOnly(boolean runtimeOnly)
Deprecated.
this property should be controlled by
ResourceDefinition.isRuntime() |
void |
unregisterAlias(PathElement address)
Unregister an alias
|
void |
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 a
wildcard registration
by adding additional attributes, operations or child types. |
void |
unregisterProxyController(PathElement address)
Unregister a proxy controller
|
void |
unregisterSubModel(PathElement address)
Unregister the existence of an addressable sub-resource of this resource.
|
getAccessConstraints, getAliasEntry, getAttributeAccess, getAttributeNames, getCapabilities, getChildAddresses, getChildNames, getMaxOccurs, getMinOccurs, getModelDescription, getNotificationDescriptions, getOperationDescription, getOperationDescriptions, getOperationEntry, getOperationFlags, getOperationHandler, getOrderedChildTypes, getPathAddress, getProxyController, getProxyControllers, isAlias, isOrderedChildResource, isRemote, isRuntimeOnly
ManagementResourceRegistration getOverrideModel(String name)
wildcard registration
by adding additional attributes, operations or child types.name
- the specific name of the resource. Cannot be null
or PathElement.WILDCARD_VALUE
null
if there is noneSecurityException
- if the caller does not have ImmutableManagementResourceRegistration.ACCESS_PERMISSION
ManagementResourceRegistration getSubModel(PathAddress address)
This method overrides the superinterface method of the same name in order to require that the returned registration be mutable.
getSubModel
in interface ImmutableManagementResourceRegistration
address
- the address, relative to this nodenull
if there is noneSecurityException
- if the caller does not have ImmutableManagementResourceRegistration.ACCESS_PERMISSION
ManagementResourceRegistration registerSubModel(ResourceDefinition resourceDefinition)
resourceDefinition
will be given the opportunity to
register attributes
,
register operations
,
and register notifications
resourceDefinition
- source for descriptive information describing this
portion of the model (must not be null
)IllegalArgumentException
- if a submodel is already registered at address
IllegalStateException
- if ImmutableManagementResourceRegistration.isRuntimeOnly()
returns true
SecurityException
- if the caller does not have ImmutableManagementResourceRegistration.ACCESS_PERMISSION
void unregisterSubModel(PathElement address)
address
- the child of this registry that should no longer be availableSecurityException
- if the caller does not have ImmutableManagementResourceRegistration.ACCESS_PERMISSION
boolean isAllowsOverride()
registerOverrideModel(String, OverrideDescriptionProvider)
is invoked. An exception will always
be thrown for root resource registrations, non-wildcard registrations
, or
remote registrations
.true
if an exception will not always be thrown; false
if it willSecurityException
- if the caller does not have ImmutableManagementResourceRegistration.ACCESS_PERMISSION
@Deprecated void setRuntimeOnly(boolean runtimeOnly)
ResourceDefinition.isRuntime()
runtimeOnly
- true
if the model node will have no representation in the
persistent configuration model; false
otherwiseSecurityException
- if the caller does not have ImmutableManagementResourceRegistration.ACCESS_PERMISSION
ManagementResourceRegistration registerOverrideModel(String name, OverrideDescriptionProvider descriptionProvider)
wildcard registration
by adding additional attributes, operations or child types.name
- the specific name of the resource. Cannot be null
or PathElement.WILDCARD_VALUE
descriptionProvider
- provider for descriptions of the additional attributes or child typesIllegalArgumentException
- if either parameter is null or if there is already a registration under name
IllegalStateException
- if ImmutableManagementResourceRegistration.isRuntimeOnly()
returns true
or if isAllowsOverride()
returns falseSecurityException
- if the caller does not have ImmutableManagementResourceRegistration.ACCESS_PERMISSION
void unregisterOverrideModel(String name)
wildcard registration
by adding additional attributes, operations or child types.name
- the specific name of the resource. Cannot be null
or PathElement.WILDCARD_VALUE
SecurityException
- if the caller does not have ImmutableManagementResourceRegistration.ACCESS_PERMISSION
void registerOperationHandler(OperationDefinition definition, OperationStepHandler handler)
definition
- the definition of operationhandler
- the operation handlerSecurityException
- if the caller does not have ImmutableManagementResourceRegistration.ACCESS_PERMISSION
void registerOperationHandler(OperationDefinition definition, OperationStepHandler handler, boolean inherited)
definition
- the definition of operationhandler
- the operation handlerinherited
- true
if the operation is inherited to child nodes, false
otherwiseSecurityException
- if the caller does not have ImmutableManagementResourceRegistration.ACCESS_PERMISSION
void unregisterOperationHandler(String operationName)
operationName
- the operation nameIllegalArgumentException
- if operationName is not registeredSecurityException
- if the caller does not have ImmutableManagementResourceRegistration.ACCESS_PERMISSION
void registerReadWriteAttribute(AttributeDefinition definition, OperationStepHandler readHandler, OperationStepHandler writeHandler)
AttributeAccess.Storage.CONFIGURATION
unless parameter
flags
includes AttributeAccess.Flag.STORAGE_RUNTIME
.definition
- the attribute definition. Cannot be null
readHandler
- the handler for attribute reads. May be null
in which case the default handling is usedwriteHandler
- the handler for attribute writes. Cannot be null
IllegalArgumentException
- if definition
or writeHandler
are null
SecurityException
- if the caller does not have ImmutableManagementResourceRegistration.ACCESS_PERMISSION
void registerReadOnlyAttribute(AttributeDefinition definition, OperationStepHandler readHandler)
AttributeAccess.Storage.CONFIGURATION
unless parameter
flags
includes AttributeAccess.Flag.STORAGE_RUNTIME
.definition
- the attribute definition. Cannot be null
readHandler
- the handler for attribute reads. May be null
in which case the default handling is usedIllegalArgumentException
- if definition
is null
SecurityException
- if the caller does not have ImmutableManagementResourceRegistration.ACCESS_PERMISSION
void registerMetric(AttributeDefinition definition, OperationStepHandler metricHandler)
definition
- the attribute definition. Cannot be null
metricHandler
- the handler for attribute reads. Cannot be null
IllegalArgumentException
- if definition
or metricHandler
are null
SecurityException
- if the caller does not have ImmutableManagementResourceRegistration.ACCESS_PERMISSION
void unregisterAttribute(String attributeName)
attributeName
- the name of the attribute. Cannot be null
SecurityException
- if the caller does not have ImmutableManagementResourceRegistration.ACCESS_PERMISSION
void registerProxyController(PathElement address, ProxyController proxyController)
address
- the child of this registry that should be proxiedproxyController
- the proxy controllerSecurityException
- if the caller does not have ImmutableManagementResourceRegistration.ACCESS_PERMISSION
void unregisterProxyController(PathElement address)
address
- the child of this registry that should no longer be proxiedSecurityException
- if the caller does not have ImmutableManagementResourceRegistration.ACCESS_PERMISSION
void registerAlias(PathElement address, AliasEntry aliasEntry)
address
- the child of this registry that is an aliasaliasEntry
- the target modelSecurityException
- if the caller does not have ImmutableManagementResourceRegistration.ACCESS_PERMISSION
void unregisterAlias(PathElement address)
address
- the child of this registry that is an aliasSecurityException
- if the caller does not have ImmutableManagementResourceRegistration.ACCESS_PERMISSION
void registerNotification(NotificationDefinition notification, boolean inherited)
notification
- the definition of the notification. Cannot be null
inherited
- true
if the notification is inherited to child nodes, false
otherwiseIllegalArgumentException
- if notification
is null
SecurityException
- if the caller does not have ImmutableManagementResourceRegistration.ACCESS_PERMISSION
void registerNotification(NotificationDefinition notification)
notification
- the definition of the notification. Cannot be null
IllegalArgumentException
- if notificationType
or notificationEntry
is null
SecurityException
- if the caller does not have ImmutableManagementResourceRegistration.ACCESS_PERMISSION
void unregisterNotification(String notificationType)
notificationType
- the type of the notification. Cannot be null
SecurityException
- if the caller does not have ImmutableManagementResourceRegistration.ACCESS_PERMISSION
void registerCapability(RuntimeCapability capability)
capability
- a capability to registerCopyright © 2023 JBoss by Red Hat. All rights reserved.