XMLConfigurator

An XMLConfigurator obtains a configuration by processing an XML document.

In order to use an XMLConfigurator to obtain a configuration, a client must implement three abstractions:

  • A Configuration specific to the client's requirements.

  • An enumeration that satisfies the XMLElement interface. This enumeration defines all valid elements for a particular document type. Members must be able to satisfy requests for their qualified name and immediate parentage. Members are also responsible for their own processing (see startElement and endElement.

  • An XMLConfiguratorState that maintains any state required by the XMLConfigurator during the processing of an XML document. This state may be interrogated by the XMLElements.

Author

Todd L Smith

Parameters

ConfigurationType

A concrete Configuration class.

ElementType

A concrete XMLElement class.

StateType

A concrete XMLConfiguratorState class.

configuration
state

The initial configurator state.

elementClass
documentStream

The input stream which contains the XML document that describes the configuration.

Constructors

Link copied to clipboard
constructor(configuration: ConfigurationType, state: StateType, elementClass: Class<ElementType>, documentStream: InputStream)

Construct a new XMLConfigurator.

Properties

Link copied to clipboard
open override val configuration: ConfigurationType
Link copied to clipboard

Functions

Link copied to clipboard
open override fun updateConfiguration()

Using information provided during construction of the configurator, produce the entailed configuration.