Package org.jboss.as.controller.parsing
Interface ExtensionParsingContext
-
- All Superinterfaces:
FeatureFilter
,FeatureRegistry
public interface ExtensionParsingContext extends FeatureRegistry
Context in effect when theextension
element for a givenExtension
is being parsed. Allows the extension toinitialize the XML parsers
that can be used for parsing thesubsystem
elements that contain the configuration for its subsystems.- Author:
- David M. Lloyd
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ProcessType
getProcessType()
Gets the type of the current process.RunningMode
getRunningMode()
Gets the current running mode of the process.void
setProfileParsingCompletionHandler(ProfileParsingCompletionHandler handler)
Registers aProfileParsingCompletionHandler
to receive a callback upon completion of parsing of a profile.void
setSubsystemXmlMapping(String subsystemName, String namespaceUri, Supplier<org.jboss.staxmapper.XMLElementReader<List<org.jboss.dmr.ModelNode>>> supplier)
Set the parser for the profile-wide subsystem configuration XML element.void
setSubsystemXmlMapping(String subsystemName, String namespaceUri, org.jboss.staxmapper.XMLElementReader<List<org.jboss.dmr.ModelNode>> reader)
Set the parser for the profile-wide subsystem configuration XML element.default <S extends SubsystemSchema<S>>
voidsetSubsystemXmlMappings(String subsystemName, Set<S> schemas)
Set the parser for the profile-wide subsystem configuration XML element.-
Methods inherited from interface org.jboss.as.controller.FeatureRegistry
enables, getStability
-
-
-
-
Method Detail
-
getProcessType
ProcessType getProcessType()
Gets the type of the current process.- Returns:
- the current process type. Will not be
null
-
getRunningMode
RunningMode getRunningMode()
Gets the current running mode of the process.- Returns:
- the current running mode. Will not be
null
-
setSubsystemXmlMapping
void setSubsystemXmlMapping(String subsystemName, String namespaceUri, org.jboss.staxmapper.XMLElementReader<List<org.jboss.dmr.ModelNode>> reader)
Set the parser for the profile-wide subsystem configuration XML element. The element is always called"subsystem"
. The reader should populate the given model node with the appropriate "subsystem add" update, without the address or operation name as that information will be automatically populated.- Parameters:
subsystemName
- the name of the subsystem. Cannot benull
namespaceUri
- the URI of the subsystem's XML namespace, in string form. Cannot benull
reader
- the element reader. Cannot benull
- Throws:
IllegalStateException
- if anotherExtension
has already registered a subsystem with the givensubsystemName
-
setSubsystemXmlMapping
void setSubsystemXmlMapping(String subsystemName, String namespaceUri, Supplier<org.jboss.staxmapper.XMLElementReader<List<org.jboss.dmr.ModelNode>>> supplier)
Set the parser for the profile-wide subsystem configuration XML element. The element is always called"subsystem"
. The reader should populate the given model node with the appropriate "subsystem add" update, without the address or operation name as that information will be automatically populated. It is recommended that supplier always creates new instance of theXMLElementReader
instead of caching and returning always same instance.- Parameters:
subsystemName
- the name of the subsystem. Cannot benull
namespaceUri
- the URI of the sussystem's XML namespace, in string form. Cannot benull
supplier
- of the element reader. Cannot benull
- Throws:
IllegalStateException
- if anotherExtension
has already registered a subsystem with the givensubsystemName
-
setSubsystemXmlMappings
default <S extends SubsystemSchema<S>> void setSubsystemXmlMappings(String subsystemName, Set<S> schemas)
Set the parser for the profile-wide subsystem configuration XML element. The element is always called"subsystem"
. The reader of the schema should populate the given model node with the appropriate "subsystem add" update, without the address or operation name as that information will be automatically populated.- Type Parameters:
S
- the schema type- Parameters:
subsystemName
- the name of the subsystem. Cannot benull
schemas
- a set of schemas to be registered
-
setProfileParsingCompletionHandler
void setProfileParsingCompletionHandler(ProfileParsingCompletionHandler handler)
Registers aProfileParsingCompletionHandler
to receive a callback upon completion of parsing of a profile.- Parameters:
handler
- the handler. Cannot benull
-
-