com.hazelcast.config
Class XmlConfigBuilder

java.lang.Object
  extended by com.hazelcast.config.AbstractXmlConfigHelper
      extended by com.hazelcast.config.XmlConfigBuilder
All Implemented Interfaces:
ConfigBuilder

public class XmlConfigBuilder
extends AbstractXmlConfigHelper
implements ConfigBuilder

A XML ConfigBuilder implementation.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.hazelcast.config.AbstractXmlConfigHelper
AbstractXmlConfigHelper.IterableNodeList
 
Field Summary
 
Fields inherited from class com.hazelcast.config.AbstractXmlConfigHelper
domLevel3
 
Constructor Summary
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 file.
 
Method Summary
 Config build()
          Builds Config object.
 Properties getProperties()
          Gets the current used properties.
 XmlConfigBuilder setProperties(Properties properties)
          Sets the used properties.
 
Methods inherited from class com.hazelcast.config.AbstractXmlConfigHelper
appendToken, checkTrue, cleanNodeName, cleanNodeName, fillDataSerializableFactories, fillPortableFactories, fillProperties, fillSerializers, getAttribute, getIntegerValue, getTextContent, hasTextContent, parseSerialization, parseSocketInterceptorConfig, xmlToJavaName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlConfigBuilder

public XmlConfigBuilder(String xmlFileName)
                 throws FileNotFoundException
Constructs a XmlConfigBuilder that reads from the provided file.

Parameters:
xmlFileName - the name of the XML file
Throws:
FileNotFoundException - if the file can't be found.

XmlConfigBuilder

public XmlConfigBuilder(InputStream inputStream)
Constructs a XmlConfigBuilder that reads from the given InputStream.

Parameters:
inputStream - the InputStream containing the XML configuration.
Throws:
IllegalArgumentException - if inputStream is null.

XmlConfigBuilder

public XmlConfigBuilder()
Constructs a XmlConfigBuilder that tries to find a usable XML configuration file.

Method Detail

getProperties

public Properties getProperties()
Gets the current used properties. Can be null if no properties are set.

Returns:
the used properties.
See Also:
setProperties(java.util.Properties)

setProperties

public XmlConfigBuilder setProperties(Properties properties)
Sets the used properties. Can be null if no properties should be used.

Properties are used to resolve ${variable} occurrences in the XML file.

Parameters:
properties - the new properties.
Returns:
the XmlConfigBuilder

build

public Config build()
Description copied from interface: ConfigBuilder
Builds Config object.

Specified by:
build in interface ConfigBuilder
Returns:
Built Config object


Copyright © 2014 Hazelcast, Inc.. All Rights Reserved.