Class ExtensionRegistry
java.lang.Object
org.jboss.as.controller.extension.ExtensionRegistry
- All Implemented Interfaces:
FeatureFilter,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.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionExtensionRegistry(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 compatibilityExtensionRegistry(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.Usebuilder(ProcessType)instead. -
Method Summary
Modifier and TypeMethodDescriptionstatic ExtensionRegistry.Builderbuilder(ProcessType processType) Returns a builder for creating anExtensionRegistry.voidclear()Clears the registry to prepare for re-registration (e.g. as part of a reload).getAvailableSubsystems(String moduleName) Gets information about the subsystems provided by a givenExtension.getExtensionContext(String moduleName, ManagementResourceRegistration rootRegistration, ExtensionRegistryType extensionRegistryType) Deprecated, for removal: This API element is subject to removal in a future version.getExtensionContext(String moduleName, Stability stability, ManagementResourceRegistration rootRegistration, ExtensionRegistryType extensionRegistryType) Gets anExtensionContextfor use when handling anaddoperation for a resource representing anExtension.Gets the module names of all knownExtensions.getExtensionParsingContext(String moduleName, org.jboss.staxmapper.XMLMapper xmlMapper) Gets anExtensionParsingContextfor use wheninitializing the extension's parsers.Returns the feature stability supported by this feature registry.getSubsystemInfo(String name) voidinitializeParsers(Extension extension, String moduleName, org.jboss.staxmapper.XMLMapper xmlMapper) Ask the givenextensiontoinitialize its parsers.voidrecordSubsystemVersions(String moduleName, org.jboss.dmr.ModelNode subsystems) Records the versions of the subsystems associated with the givenmoduleNameas properties in the providedModelNode.voidremoveExtension(Resource rootResource, String moduleName, ManagementResourceRegistration rootRegistration) Cleans up a extension module's subsystems from the resource registration model.voidsetPathManager(PathManager pathManager) Sets thePathManagerto providevia the ExtensionContext.voidvoidsetWriterRegistry(SubsystemXmlWriterRegistry writerRegistry) Sets theSubsystemXmlWriterRegistryto use for storing subsystem marshallers.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jboss.as.controller.FeatureRegistry
enables
-
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.Usebuilder(ProcessType)instead.Constructor- Parameters:
processType- the type of the processrunningModeControl- the process' running modeauditLogger- logger for auditing changesauthorizer- hook for exposing access control information to the JMX subsystemhostControllerInfoAccessor- 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 compatibilityConstructor used by legacy controllers when testing backwards compatibility.- Parameters:
processType- the type of the processrunningModeControl- the process' running mode
-
-
Method Details
-
builder
Returns a builder for creating anExtensionRegistry.- Parameters:
processType- the process type- Returns:
- an extension registry builder
-
setWriterRegistry
Sets theSubsystemXmlWriterRegistryto use for storing subsystem marshallers.- Parameters:
writerRegistry- the writer registry
-
setPathManager
Sets thePathManagerto providevia the ExtensionContext.- Parameters:
pathManager- the path manager
-
setResolverExtensionRegistry
-
getSubsystemInfo
-
getExtensionModuleNames
Gets the module names of all knownExtensions.- Returns:
- the names. Will not return
null
-
getAvailableSubsystems
Gets information about the subsystems provided by a givenExtension.- Parameters:
moduleName- the name of the extension's module. Cannot benull- Returns:
- map of subsystem names to information about the subsystem.
-
getExtensionParsingContext
public ExtensionParsingContext getExtensionParsingContext(String moduleName, org.jboss.staxmapper.XMLMapper xmlMapper) Gets anExtensionParsingContextfor use wheninitializing the extension's parsers.- Parameters:
moduleName- the name of the extension's module. Cannot benullxmlMapper- theXMLMapperhandling the extension parsing. Can benullif 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 returnnull
-
initializeParsers
public void initializeParsers(Extension extension, String moduleName, org.jboss.staxmapper.XMLMapper xmlMapper) Ask the givenextensiontoinitialize its parsers. Should be used in preference to callinggetExtensionParsingContext(String, XMLMapper)and passing the returned value toExtension#initializeParsers(context)as this method allows the registry to take additional action when the extension is done.- Parameters:
extension- the extension. Cannot benullmoduleName- the name of the extension's module. Cannot benullxmlMapper- theXMLMapperhandling the extension parsing. Can benullif 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 anExtensionContextfor use when handling anaddoperation for a resource representing anExtension.- Parameters:
moduleName- the name of the extension's module. Cannot benullrootRegistration- the root management resource registrationextensionRegistryType- 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 returnnull
-
getExtensionContext
public ExtensionContext getExtensionContext(String moduleName, Stability stability, ManagementResourceRegistration rootRegistration, ExtensionRegistryType extensionRegistryType) Gets anExtensionContextfor use when handling anaddoperation for a resource representing anExtension.- Parameters:
moduleName- the name of the extension's module. Cannot benullstability- the stability of the extensionrootRegistration- the root management resource registrationextensionRegistryType- 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 returnnull
-
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 resourcemoduleName- the name of the extension's module. Cannot benull- Throws:
IllegalStateException- if the extension still has subsystems present inrootResourceor its children
-
clear
public void clear()Clears the registry to prepare for re-registration (e.g. as part of a reload). -
recordSubsystemVersions
Records the versions of the subsystems associated with the givenmoduleNameas properties in the providedModelNode. 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 modulesubsystems- a model node of typeModelType.UNDEFINEDor typeModelType.OBJECT
-
getTransformerRegistry
-
getStability
Description copied from interface:FeatureRegistryReturns the feature stability supported by this feature registry.- Specified by:
getStabilityin interfaceFeatureRegistry- Returns:
- a stability level
-