public class ExtensionRegistry extends Object
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:
| Constructor and Description |
|---|
ExtensionRegistry(ProcessType processType,
RunningModeControl runningModeControl)
Deprecated.
Here for core-model-test and subsystem-test backwards compatibility
|
ExtensionRegistry(ProcessType processType,
RunningModeControl runningModeControl,
ManagedAuditLogger auditLogger,
JmxAuthorizer authorizer,
Supplier<org.wildfly.security.auth.server.SecurityIdentity> securityIdentitySupplier,
RuntimeHostControllerInfoAccessor hostControllerInfoAccessor)
Constructor
|
| Modifier and Type | Method and 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 given
Extension. |
ExtensionContext |
getExtensionContext(String moduleName,
ManagementResourceRegistration rootRegistration,
boolean isMasterDomainController)
Deprecated.
use
getExtensionContext(String, ManagementResourceRegistration, ExtensionRegistryType). Main code should be using this, but this is left behind in case any tests need to use this code. |
ExtensionContext |
getExtensionContext(String moduleName,
ManagementResourceRegistration rootRegistration,
ExtensionRegistryType extensionRegistryType)
Gets an
ExtensionContext for use when handling an add operation for
a resource representing an Extension. |
Set<String> |
getExtensionModuleNames()
Gets the module names of all known
Extensions. |
ExtensionParsingContext |
getExtensionParsingContext(String moduleName,
org.jboss.staxmapper.XMLMapper xmlMapper)
Gets an
ExtensionParsingContext for use when
initializing 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 given
extension to
initialize its parsers. |
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. |
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 the
PathManager to provide via the ExtensionContext. |
void |
setWriterRegistry(SubsystemXmlWriterRegistry writerRegistry)
Sets the
SubsystemXmlWriterRegistry to use for storing subsystem marshallers. |
public ExtensionRegistry(ProcessType processType, RunningModeControl runningModeControl, ManagedAuditLogger auditLogger, JmxAuthorizer authorizer, Supplier<org.wildfly.security.auth.server.SecurityIdentity> securityIdentitySupplier, RuntimeHostControllerInfoAccessor hostControllerInfoAccessor)
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@Deprecated public ExtensionRegistry(ProcessType processType, RunningModeControl runningModeControl)
processType - the type of the processrunningModeControl - the process' running modepublic void setWriterRegistry(SubsystemXmlWriterRegistry writerRegistry)
SubsystemXmlWriterRegistry to use for storing subsystem marshallers.writerRegistry - the writer registrypublic void setPathManager(PathManager pathManager)
PathManager to provide via the ExtensionContext.pathManager - the path managerpublic SubsystemInformation getSubsystemInfo(String name)
public Set<String> getExtensionModuleNames()
Extensions.nullpublic Map<String,SubsystemInformation> getAvailableSubsystems(String moduleName)
Extension.moduleName - the name of the extension's module. Cannot be nullpublic ExtensionParsingContext getExtensionParsingContext(String moduleName, org.jboss.staxmapper.XMLMapper xmlMapper)
ExtensionParsingContext for use when
initializing the extension's parsers.moduleName - the name of the extension's module. Cannot be nullxmlMapper - 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)ExtensionParsingContext. Will not return nullpublic final void initializeParsers(Extension extension, String moduleName, org.jboss.staxmapper.XMLMapper xmlMapper)
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.extension - the extension. Cannot be nullmoduleName - the name of the extension's module. Cannot be nullxmlMapper - 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)@Deprecated public ExtensionContext getExtensionContext(String moduleName, ManagementResourceRegistration rootRegistration, boolean isMasterDomainController)
getExtensionContext(String, ManagementResourceRegistration, ExtensionRegistryType). Main code should be using this, but this is left behind in case any tests need to use this code.ExtensionContext for use when handling an add operation for
a resource representing an Extension.moduleName - the name of the extension's module. Cannot be nullrootRegistration - the root management resource registrationisMasterDomainController - set to true if we are the master domain controller, in which case transformers get registeredExtensionContext. Will not return nullpublic ExtensionContext getExtensionContext(String moduleName, ManagementResourceRegistration rootRegistration, ExtensionRegistryType extensionRegistryType)
ExtensionContext for use when handling an add operation for
a resource representing an Extension.moduleName - the name of the extension's module. Cannot be nullrootRegistration - 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.ExtensionContext. Will not return nullpublic Set<ProfileParsingCompletionHandler> getProfileParsingCompletionHandlers()
public void removeExtension(Resource rootResource, String moduleName, ManagementResourceRegistration rootRegistration) throws IllegalStateException
rootResource - the model root resourcemoduleName - the name of the extension's module. Cannot be nullIllegalStateException - if the extension still has subsystems present in rootResource or its childrenpublic void clear()
public void recordSubsystemVersions(String moduleName, org.jboss.dmr.ModelNode subsystems)
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.moduleName - the name of the extension modulesubsystems - a model node of type ModelType.UNDEFINED or type ModelType.OBJECTpublic TransformerRegistry getTransformerRegistry()
Copyright © 2020 JBoss by Red Hat. All rights reserved.