public final class CapabilityRegistry extends Object implements ImmutableCapabilityRegistry, PossibleCapabilityRegistry, RuntimeCapabilityRegistry
capabilities available in the system.RuntimeCapabilityRegistry.RuntimeStatus| Constructor and Description |
|---|
CapabilityRegistry(boolean forServer) |
| Modifier and Type | Method and Description |
|---|---|
void |
capabilityReloadRequired(PathAddress address,
ImmutableManagementResourceRegistration resourceRegistration)
Notification that any capabilities associated with the given address require reload in order to bring their
runtime services into sync with their persistent configuration.
|
void |
capabilityRestartRequired(PathAddress address,
ImmutableManagementResourceRegistration resourceRegistration)
Notification that any capabilities associated with the given address require restart in order to bring their
runtime services into sync with their persistent configuration.
|
Set<CapabilityRegistration<?>> |
getCapabilities()
Returns set of runtime capabilities registered in the registry
|
CapabilityRegistration<?> |
getCapability(CapabilityId capabilityId)
returns capability registration for capability id pass as parameter
|
<T> T |
getCapabilityRuntimeAPI(String capabilityName,
CapabilityScope scope,
Class<T> apiType)
Gets the runtime API associated with a given capability, if there is one.
|
org.jboss.msc.service.ServiceName |
getCapabilityServiceName(String capabilityName,
CapabilityScope scope,
Class<?> serviceType)
Gets the name of the service provided by the capability, if there is one.
|
Set<String> |
getDynamicCapabilityNames(String referencedCapability,
CapabilityScope dependentScope)
Retrieve all the capability names that the passed scope can access
|
Set<CapabilityRegistration<?>> |
getPossibleCapabilities()
Returns set of possible capabilities with there registration points registered in the registry
|
Set<PathAddress> |
getPossibleProviderPoints(CapabilityId capabilityId)
Returns possible provider points for passed capabilityId
|
Map<CapabilityId,RuntimeCapabilityRegistry.RuntimeStatus> |
getRuntimeStatus(PathAddress address,
ImmutableManagementResourceRegistration resourceRegistration)
Gets the status of any capabilities associated with the given resource address.
|
boolean |
hasCapability(String capabilityName,
CapabilityScope scope)
Gets whether a runtime capability with the given name is registered.
|
void |
registerAdditionalCapabilityRequirement(RuntimeRequirementRegistration requirement)
Registers an additional requirement a capability has beyond what it was aware of when
capability
was passed to registerCapability(RuntimeCapabilityRegistration). |
void |
registerCapability(RuntimeCapabilityRegistration capabilityRegistration)
Registers a capability with the system.
|
void |
registerPossibleCapability(Capability capability,
PathAddress registrationPoint)
Registers a capability with the system.
|
RuntimeCapabilityRegistration |
removeCapability(String capabilityName,
CapabilityScope scope,
PathAddress registrationPoint)
Remove a previously registered capability if all registration points for it have been removed.
|
void |
removeCapabilityRequirement(RuntimeRequirementRegistration requirementRegistration)
Remove a previously registered requirement for a capability.
|
CapabilityRegistration<?> |
removePossibleCapability(Capability capability,
PathAddress registrationPoint)
Remove a previously registered capability if all registration points for it have been removed.
|
public void registerCapability(RuntimeCapabilityRegistration capabilityRegistration)
requirements
associated with the capability will be recorded as requirements.registerCapability in interface RuntimeCapabilityRegistrycapabilityRegistration - the capability. Cannot be nullpublic void registerAdditionalCapabilityRequirement(RuntimeRequirementRegistration requirement)
capability
was passed to registerCapability(RuntimeCapabilityRegistration). Used for cases
where a capability optionally depends on another capability, and whether or not that requirement is needed is
not known when the capability is first registered.registerAdditionalCapabilityRequirement in interface RuntimeCapabilityRegistryrequirement - the requirementIllegalArgumentException - if no matching capability is currently
registered for either required or dependentpublic void removeCapabilityRequirement(RuntimeRequirementRegistration requirementRegistration)
removeCapabilityRequirement in interface RuntimeCapabilityRegistryrequirementRegistration - the requirement. Cannot be nullregisterAdditionalCapabilityRequirement(org.jboss.as.controller.capability.registry.RuntimeRequirementRegistration)public RuntimeCapabilityRegistration removeCapability(String capabilityName, CapabilityScope scope, PathAddress registrationPoint)
removeCapability in interface RuntimeCapabilityRegistrycapabilityName - the name of the capability. Cannot be nullscope - the context in which the capability is registered. Cannot be nullregistrationPoint - the specific registration point that is being removednull if no matching capability was registered or other
registration points for the capability still existpublic Map<CapabilityId,RuntimeCapabilityRegistry.RuntimeStatus> getRuntimeStatus(PathAddress address, ImmutableManagementResourceRegistration resourceRegistration)
RuntimeCapabilityRegistrygetRuntimeStatus in interface RuntimeCapabilityRegistryaddress - the address. Cannot be nullresourceRegistration - the registration for the resource at address. Cannot be nullnull but may return
an empty map if no capabilities are associated with the address.public void capabilityReloadRequired(PathAddress address, ImmutableManagementResourceRegistration resourceRegistration)
RuntimeCapabilityRegistrycapabilityReloadRequired in interface RuntimeCapabilityRegistryaddress - the address. Cannot be nullresourceRegistration - the registration for the resource at address. Cannot be nullpublic void capabilityRestartRequired(PathAddress address, ImmutableManagementResourceRegistration resourceRegistration)
RuntimeCapabilityRegistrycapabilityRestartRequired in interface RuntimeCapabilityRegistryaddress - the address. Cannot be nullresourceRegistration - the registration for the resource at address. Cannot be nullpublic void registerPossibleCapability(Capability capability, PathAddress registrationPoint)
requirements
associated with the capability will be recorded as requirements.registerPossibleCapability in interface PossibleCapabilityRegistrycapability - the capability. Cannot be nullpublic CapabilityRegistration<?> removePossibleCapability(Capability capability, PathAddress registrationPoint)
removePossibleCapability in interface PossibleCapabilityRegistrycapability - the capability. Cannot be nullregistrationPoint - the specific registration point that is being removednull if no matching capability was registered or other
registration points for the capability still existpublic boolean hasCapability(String capabilityName, CapabilityScope scope)
ImmutableCapabilityRegistryhasCapability in interface ImmutableCapabilityRegistrycapabilityName - the name of the capability. Cannot be nullscope - the scope in which to check for the capabilitytrue if there is a capability with the given name registeredpublic <T> T getCapabilityRuntimeAPI(String capabilityName, CapabilityScope scope, Class<T> apiType)
ImmutableCapabilityRegistrygetCapabilityRuntimeAPI in interface ImmutableCapabilityRegistryT - the java type that exposes the APIcapabilityName - the name of the capability. Cannot be nullscope - the scope in which to resolve the capability. Cannot be nullapiType - class of the java type that exposes the API. Cannot be nullnullpublic Set<CapabilityRegistration<?>> getCapabilities()
ImmutableCapabilityRegistrygetCapabilities in interface ImmutableCapabilityRegistrySet with all runtime capabilities and where ware they registeredpublic Set<CapabilityRegistration<?>> getPossibleCapabilities()
ImmutableCapabilityRegistrygetPossibleCapabilities in interface ImmutableCapabilityRegistrySet with all possible capabilities and where ware they registeredpublic org.jboss.msc.service.ServiceName getCapabilityServiceName(String capabilityName, CapabilityScope scope, Class<?> serviceType)
ImmutableCapabilityRegistrygetCapabilityServiceName in interface ImmutableCapabilityRegistrycapabilityName - the name of the capability. Cannot be nullscope - the scope in which to resolve the capability. Cannot be nullserviceType - the type of the value provided by the service. May be null if the caller is
unconcerned about checking that its understanding of the service type provided by the
capability is correctnullpublic Set<PathAddress> getPossibleProviderPoints(CapabilityId capabilityId)
ImmutableCapabilityRegistrygetPossibleProviderPoints in interface ImmutableCapabilityRegistrycapabilityId - id of capabilitynull but can be emptypublic CapabilityRegistration<?> getCapability(CapabilityId capabilityId)
ImmutableCapabilityRegistrygetCapability in interface ImmutableCapabilityRegistrycapabilityId - id of capability with its scope.public Set<String> getDynamicCapabilityNames(String referencedCapability, CapabilityScope dependentScope)
ImmutableCapabilityRegistrygetDynamicCapabilityNames in interface ImmutableCapabilityRegistryreferencedCapability - The static name of the capabilitydependentScope - The scope from which the capability is referencedCopyright © 2021 JBoss by Red Hat. All rights reserved.