Interface RuntimeCapabilityRegistry

All Superinterfaces:
ImmutableCapabilityRegistry
All Known Implementing Classes:
CapabilityRegistry

public interface RuntimeCapabilityRegistry extends ImmutableCapabilityRegistry
Registry of capabilities available in the runtime.
Author:
Brian Stansberry (c) 2014 Red Hat Inc., Tomaz Cerar (c) 2015 Red Hat Inc.
  • Method Details

    • registerCapability

      void registerCapability(RuntimeCapabilityRegistration capability)
      Registers a capability with the system. Any requirements associated with the capability will be recorded as requirements.
      Parameters:
      capability - the capability. Cannot be null
    • registerAdditionalCapabilityRequirement

      void registerAdditionalCapabilityRequirement(RuntimeRequirementRegistration requirement)
      Registers an additional requirement a capability has beyond what it was aware of when 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.
      Parameters:
      requirement - the requirement
      Throws:
      IllegalArgumentException - if no matching capability is currently registered for either required or dependent
    • removeCapabilityRequirement

      void removeCapabilityRequirement(RuntimeRequirementRegistration requirement)
      Remove a previously registered requirement for a capability.
      Parameters:
      requirement - the requirement. Cannot be null
      See Also:
    • 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 be null
      scope - the scope in which the capability is registered. Cannot be null
      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 context
      IllegalArgumentException - if the capability does not provide a runtime API
      ClassCastException - if the runtime API exposed by the capability cannot be cast to type {code T}
    • getRuntimeStatus

      Gets the status of any capabilities associated with the given resource address.
      Parameters:
      address - the address. Cannot be null
      resourceRegistration - the registration for the resource at address. Cannot be null
      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 be null
      resourceRegistration - the registration for the resource at address. Cannot be null
    • 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 be null
      resourceRegistration - the registration for the resource at address. Cannot be null