public class XmlConfigBuilder extends AbstractConfigBuilder implements ConfigBuilder
ConfigBuilder
implementation.AbstractConfigBuilder.ConfigType
domLevel3
Constructor and Description |
---|
XmlConfigBuilder()
Constructs a XmlConfigBuilder that tries to find a usable XML configuration file.
|
XmlConfigBuilder(InputStream inputStream)
Constructs a XmlConfigBuilder that reads from the given InputStream.
|
XmlConfigBuilder(String xmlFileName)
Constructs a XmlConfigBuilder that reads from the provided XML file.
|
XmlConfigBuilder(URL url)
Constructs a XMLConfigBuilder that reads from the given URL.
|
Modifier and Type | Method and Description |
---|---|
Config |
build()
Builds Config object.
|
Properties |
getProperties()
Gets the current used properties.
|
protected AbstractConfigBuilder.ConfigType |
getXmlType() |
protected Document |
parse(InputStream is)
Reads XML from InputStream and parses.
|
XmlConfigBuilder |
setProperties(Properties properties)
Sets the used properties.
|
process
appendToken, asElementIterable, childElements, cleanNodeName, fillDataSerializableFactories, fillNativeMemoryConfig, fillPortableFactories, fillProperties, fillProperties, fillSerializers, getAttribute, getBooleanValue, getIntegerValue, getLongValue, getNamespaceType, getReleaseVersion, getTextContent, hasTextContent, loadSchemaFile, parseSerialization, parseSocketInterceptorConfig, schemaValidation, xmlToJavaName
public XmlConfigBuilder(String xmlFileName) throws FileNotFoundException
xmlFileName
- the name of the XML file that the XmlConfigBuilder reads fromFileNotFoundException
- if the file can't be found.public XmlConfigBuilder(InputStream inputStream)
inputStream
- the InputStream containing the XML configuration.IllegalArgumentException
- if inputStream is null.public XmlConfigBuilder(URL url) throws IOException
url
- the given url that the XMLConfigBuilder reads fromIOException
- if URL is invalidpublic XmlConfigBuilder()
public Properties getProperties()
getProperties
in class AbstractConfigBuilder
setProperties(java.util.Properties)
public XmlConfigBuilder setProperties(Properties properties)
properties
- the new properties.protected AbstractConfigBuilder.ConfigType getXmlType()
getXmlType
in class AbstractConfigBuilder
public Config build()
ConfigBuilder
build
in interface ConfigBuilder
protected Document parse(InputStream is) throws Exception
AbstractConfigBuilder
parse
in class AbstractConfigBuilder
is
- InputStream
to read fromException
- if the XML configuration cannot be parsed or is invalidCopyright © 2017 Hazelcast, Inc.. All Rights Reserved.