Class XmlConfigBuilder

All Implemented Interfaces:
ConfigBuilder

public class XmlConfigBuilder extends AbstractXmlConfigBuilder implements ConfigBuilder
A XML ConfigBuilder implementation.

Unlike Config.load() and its variants, a configuration constructed via XmlConfigBuilder does not apply overrides found in environment variables/system properties.

  • Constructor Details

    • XmlConfigBuilder

      public XmlConfigBuilder(String xmlFileName) throws FileNotFoundException
      Constructs a XmlConfigBuilder that reads from the provided XML file.
      Parameters:
      xmlFileName - the name of the XML file that the XmlConfigBuilder reads from
      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(URL url) throws IOException
      Constructs a XMLConfigBuilder that reads from the given URL.
      Parameters:
      url - the given url that the XMLConfigBuilder reads from
      Throws:
      IOException - if URL is invalid
    • XmlConfigBuilder

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

      @PrivateApi public XmlConfigBuilder(com.hazelcast.internal.config.XmlConfigLocator locator)
      Constructs a XmlConfigBuilder that loads the configuration with the provided XmlConfigLocator.

      If the provided XmlConfigLocator is null, a new instance is created and the config is located in every possible places. For these places, please see XmlConfigLocator.

      If the provided XmlConfigLocator is not null, it is expected that it already located the configuration XML to load from. No further attempt to locate the configuration XML is made if the configuration XML is not located already.

      Parameters:
      locator - the configured locator to use
  • Method Details