Class ExtensionRegistry
- java.lang.Object
-
- org.jboss.as.controller.extension.ExtensionRegistry
-
public final class ExtensionRegistry extends Object
A registry for information aboutExtension
s 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 Summary
Constructors Constructor Description ExtensionRegistry(ProcessType processType, RunningModeControl runningModeControl)
Deprecated.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)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
clear()
Clears the registry to prepare for re-registration (e.g.Map<String,SubsystemInformation>
getAvailableSubsystems(String moduleName)
Gets information about the subsystems provided by a givenExtension
.ExtensionContext
getExtensionContext(String moduleName, ManagementResourceRegistration rootRegistration, boolean isMasterDomainController)
ExtensionContext
getExtensionContext(String moduleName, ManagementResourceRegistration rootRegistration, ExtensionRegistryType extensionRegistryType)
Gets anExtensionContext
for use when handling anadd
operation for a resource representing anExtension
.Set<String>
getExtensionModuleNames()
Gets the module names of all knownExtension
s.ExtensionParsingContext
getExtensionParsingContext(String moduleName, org.jboss.staxmapper.XMLMapper xmlMapper)
Gets anExtensionParsingContext
for use wheninitializing the extension's parsers
.Set<ProfileParsingCompletionHandler>
getProfileParsingCompletionHandlers()
SubsystemInformation
getSubsystemInfo(String name)
TransformerRegistry
getTransformerRegistry()
void
initializeParsers(Extension extension, String moduleName, org.jboss.staxmapper.XMLMapper xmlMapper)
Ask the givenextension
toinitialize its parsers
.void
recordSubsystemVersions(String moduleName, org.jboss.dmr.ModelNode subsystems)
Records the versions of the subsystems associated with the givenmoduleName
as properties in the providedModelNode
.void
removeExtension(Resource rootResource, String moduleName, ManagementResourceRegistration rootRegistration)
Cleans up a extension module's subsystems from the resource registration model.void
setPathManager(PathManager pathManager)
Sets thePathManager
to providevia the ExtensionContext
.void
setResolverExtensionRegistry(ResolverExtensionRegistry registry)
void
setWriterRegistry(SubsystemXmlWriterRegistry writerRegistry)
Sets theSubsystemXmlWriterRegistry
to use for storing subsystem marshallers.
-
-
-
Constructor Detail
-
ExtensionRegistry
public ExtensionRegistry(ProcessType processType, RunningModeControl runningModeControl, ManagedAuditLogger auditLogger, JmxAuthorizer authorizer, Supplier<org.wildfly.security.auth.server.SecurityIdentity> securityIdentitySupplier, RuntimeHostControllerInfoAccessor hostControllerInfoAccessor)
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 public ExtensionRegistry(ProcessType processType, RunningModeControl runningModeControl)
Deprecated.Here for core-model-test and subsystem-test backwards compatibilityConstructor- Parameters:
processType
- the type of the processrunningModeControl
- the process' running mode
-
-
Method Detail
-
setWriterRegistry
public void setWriterRegistry(SubsystemXmlWriterRegistry writerRegistry)
Sets theSubsystemXmlWriterRegistry
to use for storing subsystem marshallers.- Parameters:
writerRegistry
- the writer registry
-
setPathManager
public void setPathManager(PathManager pathManager)
Sets thePathManager
to providevia the ExtensionContext
.- 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 knownExtension
s.- Returns:
- the names. Will not return
null
-
getAvailableSubsystems
public Map<String,SubsystemInformation> getAvailableSubsystems(String moduleName)
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 anExtensionParsingContext
for use wheninitializing the extension's parsers
.- Parameters:
moduleName
- the name of the extension's module. Cannot benull
xmlMapper
- theXMLMapper
handling the extension parsing. Can benull
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 returnnull
-
initializeParsers
public final void initializeParsers(Extension extension, String moduleName, org.jboss.staxmapper.XMLMapper xmlMapper)
Ask the givenextension
toinitialize 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 benull
moduleName
- the name of the extension's module. Cannot benull
xmlMapper
- theXMLMapper
handling the extension parsing. Can benull
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 public ExtensionContext getExtensionContext(String moduleName, ManagementResourceRegistration rootRegistration, boolean isMasterDomainController)
Deprecated.usegetExtensionContext(String, ManagementResourceRegistration, ExtensionRegistryType)
. Main code should be using this, but this is left behind in case any tests need to use this code.Gets anExtensionContext
for use when handling anadd
operation for a resource representing anExtension
.- Parameters:
moduleName
- the name of the extension's module. Cannot benull
rootRegistration
- the root management resource registrationisMasterDomainController
- set totrue
if we are the master domain controller, in which case transformers get registered- Returns:
- the
ExtensionContext
. Will not returnnull
-
getExtensionContext
public ExtensionContext getExtensionContext(String moduleName, ManagementResourceRegistration rootRegistration, ExtensionRegistryType extensionRegistryType)
Gets anExtensionContext
for use when handling anadd
operation for a resource representing anExtension
.- Parameters:
moduleName
- the name of the extension's module. Cannot benull
rootRegistration
- 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
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 resourcemoduleName
- the name of the extension's module. Cannot benull
- Throws:
IllegalStateException
- if the extension still has subsystems present inrootResource
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 givenmoduleName
as 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.UNDEFINED
or typeModelType.OBJECT
-
getTransformerRegistry
public TransformerRegistry getTransformerRegistry()
-
-