Interface RuntimeCapabilityRegistry
-
- All Superinterfaces:
ImmutableCapabilityRegistry
- All Known Implementing Classes:
CapabilityRegistry
public interface RuntimeCapabilityRegistry extends ImmutableCapabilityRegistry
Registry ofcapabilitiesavailable 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 classRuntimeCapabilityRegistry.RuntimeStatus
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcapabilityReloadRequired(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.voidcapabilityRestartRequired(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.voidregisterAdditionalCapabilityRequirement(RuntimeRequirementRegistration requirement)Registers an additional requirement a capability has beyond what it was aware of whencapabilitywas passed toregisterCapability(RuntimeCapabilityRegistration).voidregisterCapability(RuntimeCapabilityRegistration capability)Registers a capability with the system.RuntimeCapabilityRegistrationremoveCapability(String capabilityName, CapabilityScope scope, PathAddress registrationPoint)Remove a previously registered capability if all registration points for it have been removed.voidremoveCapabilityRequirement(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. Anyrequirementsassociated 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 whencapabilitywas 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 currentlyregisteredfor eitherrequiredordependent
-
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 benullscope- the scope in which the capability is registered. Cannot benullregistrationPoint- the specific registration point that is being removed- Returns:
- the capability that was removed, or
nullif 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 benullresourceRegistration- the registration for the resource ataddress. Cannot benull- Returns:
- a map of capability ids to their runtime status. Will not return
nullbut 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 benullresourceRegistration- 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 benullresourceRegistration- the registration for the resource ataddress. Cannot benull
-
-