Class ExtensionRegistry

java.lang.Object
org.jboss.as.controller.extension.ExtensionRegistry
All Implemented Interfaces:
FeatureFilter, FeatureRegistry

public final class ExtensionRegistry extends Object implements FeatureRegistry
A registry for information about Extensions to the core application server. In server/standalone mode there will be one extension registry for the whole server process. In domain mode, there will be:
  • One extension registry for extensions in the domain model
  • One extension registry for extension in the host model
Author:
Brian Stansberry (c) 2011 Red Hat Inc.
  • Constructor Details

    • ExtensionRegistry

      @Deprecated(forRemoval=true) public ExtensionRegistry(ProcessType processType, RunningModeControl runningModeControl, ManagedAuditLogger auditLogger, JmxAuthorizer authorizer, Supplier<org.wildfly.security.auth.server.SecurityIdentity> securityIdentitySupplier, RuntimeHostControllerInfoAccessor hostControllerInfoAccessor)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructor
      Parameters:
      processType - the type of the process
      runningModeControl - the process' running mode
      auditLogger - logger for auditing changes
      authorizer - hook for exposing access control information to the JMX subsystem
      hostControllerInfoAccessor - the host controller
    • ExtensionRegistry

      @Deprecated(forRemoval=true) public ExtensionRegistry(ProcessType processType, RunningModeControl runningModeControl)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Here for core-model-test and subsystem-test backwards compatibility
      Constructor used by legacy controllers when testing backwards compatibility.
      Parameters:
      processType - the type of the process
      runningModeControl - the process' running mode
  • Method Details

    • builder

      public static ExtensionRegistry.Builder builder(ProcessType processType)
      Returns a builder for creating an ExtensionRegistry.
      Parameters:
      processType - the process type
      Returns:
      an extension registry builder
    • setWriterRegistry

      public void setWriterRegistry(SubsystemXmlWriterRegistry writerRegistry)
      Sets the SubsystemXmlWriterRegistry to use for storing subsystem marshallers.
      Parameters:
      writerRegistry - the writer registry
    • setPathManager

      public void setPathManager(PathManager pathManager)
      Parameters:
      pathManager - the path manager
    • setResolverExtensionRegistry

      public void setResolverExtensionRegistry(ResolverExtensionRegistry registry)
    • getSubsystemInfo

      public SubsystemInformation getSubsystemInfo(String name)
    • getExtensionModuleNames

      public Set<String> getExtensionModuleNames()
      Gets the module names of all known Extensions.
      Returns:
      the names. Will not return null
    • getAvailableSubsystems

      public Map<String,SubsystemInformation> getAvailableSubsystems(String moduleName)
      Gets information about the subsystems provided by a given Extension.
      Parameters:
      moduleName - the name of the extension's module. Cannot be null
      Returns:
      map of subsystem names to information about the subsystem.
    • getExtensionParsingContext

      public ExtensionParsingContext getExtensionParsingContext(String moduleName, org.jboss.staxmapper.XMLMapper xmlMapper)
      Parameters:
      moduleName - the name of the extension's module. Cannot be null
      xmlMapper - the XMLMapper handling the extension parsing. Can be null if there won't be any actual parsing (e.g. in a slave Host Controller or in a server in a managed domain)
      Returns:
      the ExtensionParsingContext. Will not return null
    • initializeParsers

      public void initializeParsers(Extension extension, String moduleName, org.jboss.staxmapper.XMLMapper xmlMapper)
      Ask the given extension to initialize its parsers. Should be used in preference to calling getExtensionParsingContext(String, XMLMapper) and passing the returned value to Extension#initializeParsers(context) as this method allows the registry to take additional action when the extension is done.
      Parameters:
      extension - the extension. Cannot be null
      moduleName - the name of the extension's module. Cannot be null
      xmlMapper - the XMLMapper handling the extension parsing. Can be null if there won't be any actual parsing (e.g. in a slave Host Controller or in a server in a managed domain)
    • getExtensionContext

      @Deprecated(forRemoval=true) public ExtensionContext getExtensionContext(String moduleName, ManagementResourceRegistration rootRegistration, ExtensionRegistryType extensionRegistryType)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets an ExtensionContext for use when handling an add operation for a resource representing an Extension.
      Parameters:
      moduleName - the name of the extension's module. Cannot be null
      rootRegistration - the root management resource registration
      extensionRegistryType - the type of registry we are working on, which has an effect on things like whether extensions get registered etc.
      Returns:
      the ExtensionContext. Will not return null
    • getExtensionContext

      public ExtensionContext getExtensionContext(String moduleName, Stability stability, ManagementResourceRegistration rootRegistration, ExtensionRegistryType extensionRegistryType)
      Gets an ExtensionContext for use when handling an add operation for a resource representing an Extension.
      Parameters:
      moduleName - the name of the extension's module. Cannot be null
      stability - the stability of the extension
      rootRegistration - the root management resource registration
      extensionRegistryType - the type of registry we are working on, which has an effect on things like whether extensions get registered etc.
      Returns:
      the ExtensionContext. Will not return null
    • getProfileParsingCompletionHandlers

      public Set<ProfileParsingCompletionHandler> getProfileParsingCompletionHandlers()
    • removeExtension

      public void removeExtension(Resource rootResource, String moduleName, ManagementResourceRegistration rootRegistration) throws IllegalStateException
      Cleans up a extension module's subsystems from the resource registration model.
      Parameters:
      rootResource - the model root resource
      moduleName - the name of the extension's module. Cannot be null
      Throws:
      IllegalStateException - if the extension still has subsystems present in rootResource or its children
    • clear

      public void clear()
      Clears the registry to prepare for re-registration (e.g. as part of a reload).
    • recordSubsystemVersions

      public void recordSubsystemVersions(String moduleName, org.jboss.dmr.ModelNode subsystems)
      Records the versions of the subsystems associated with the given moduleName as properties in the provided ModelNode. Each subsystem property key will be the subsystem name and the value will be a string composed of the subsystem major version dot appended to its minor version.
      Parameters:
      moduleName - the name of the extension module
      subsystems - a model node of type ModelType.UNDEFINED or type ModelType.OBJECT
    • getTransformerRegistry

      public TransformerRegistry getTransformerRegistry()
    • getStability

      public Stability getStability()
      Description copied from interface: FeatureRegistry
      Returns the feature stability supported by this feature registry.
      Specified by:
      getStability in interface FeatureRegistry
      Returns:
      a stability level