Interface RuntimeCapabilityRegistry
-
- All Superinterfaces:
ImmutableCapabilityRegistry
- All Known Implementing Classes:
CapabilityRegistry
public interface RuntimeCapabilityRegistry extends ImmutableCapabilityRegistry
Registry ofcapabilities
available in the runtime.- Author:
- Brian Stansberry (c) 2014 Red Hat Inc., Tomaz Cerar (c) 2015 Red Hat Inc.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
RuntimeCapabilityRegistry.RuntimeStatus
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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.Map<CapabilityId,RuntimeCapabilityRegistry.RuntimeStatus>
getRuntimeStatus(PathAddress address, ImmutableManagementResourceRegistration resourceRegistration)
Gets the status of any capabilities associated with the given resource address.void
registerAdditionalCapabilityRequirement(RuntimeRequirementRegistration requirement)
Registers an additional requirement a capability has beyond what it was aware of whencapability
was passed toregisterCapability(RuntimeCapabilityRegistration)
.void
registerCapability(RuntimeCapabilityRegistration capability)
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 requirement)
Remove a previously registered requirement for a capability.-
Methods inherited from interface org.jboss.as.controller.capability.registry.ImmutableCapabilityRegistry
getCapabilities, getCapability, getCapabilityRuntimeAPI, getCapabilityServiceName, getDynamicCapabilityNames, getPossibleCapabilities, getPossibleProviderPoints, hasCapability
-
-
-
-
Method Detail
-
registerCapability
void registerCapability(RuntimeCapabilityRegistration capability)
Registers a capability with the system. Anyrequirements
associated with the capability will be recorded as requirements.- Parameters:
capability
- the capability. Cannot benull
-
registerAdditionalCapabilityRequirement
void registerAdditionalCapabilityRequirement(RuntimeRequirementRegistration requirement)
Registers an additional requirement a capability has beyond what it was aware of whencapability
was passed toregisterCapability(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.- Parameters:
requirement
- the requirement- Throws:
IllegalArgumentException
- if no matching capability is currentlyregistered
for eitherrequired
ordependent
-
removeCapabilityRequirement
void removeCapabilityRequirement(RuntimeRequirementRegistration requirement)
Remove a previously registered requirement for a capability.- Parameters:
requirement
- the requirement. Cannot benull
- See Also:
registerAdditionalCapabilityRequirement(org.jboss.as.controller.capability.registry.RuntimeRequirementRegistration)
-
removeCapability
RuntimeCapabilityRegistration removeCapability(String capabilityName, CapabilityScope scope, PathAddress registrationPoint)
Remove a previously registered capability if all registration points for it have been removed.- Parameters:
capabilityName
- the name of the capability. Cannot benull
scope
- the scope in which the capability is registered. Cannot benull
registrationPoint
- the specific registration point that is being removed- Returns:
- the capability that was removed, or
null
if no matching capability was registered or other registration points for the capability still exist - Throws:
IllegalStateException
- if no capability with the given name is available in the given contextIllegalArgumentException
- if the capability does not provide a runtime APIClassCastException
- if the runtime API exposed by the capability cannot be cast to type {code T}
-
getRuntimeStatus
Map<CapabilityId,RuntimeCapabilityRegistry.RuntimeStatus> getRuntimeStatus(PathAddress address, ImmutableManagementResourceRegistration resourceRegistration)
Gets the status of any capabilities associated with the given resource address.- Parameters:
address
- the address. Cannot benull
resourceRegistration
- the registration for the resource ataddress
. Cannot benull
- Returns:
- a map of capability ids to their runtime status. Will not return
null
but may return an empty map if no capabilities are associated with the address.
-
capabilityReloadRequired
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.- Parameters:
address
- the address. Cannot benull
resourceRegistration
- the registration for the resource ataddress
. Cannot benull
-
capabilityRestartRequired
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.- Parameters:
address
- the address. Cannot benull
resourceRegistration
- the registration for the resource ataddress
. Cannot benull
-
-