Package com.hazelcast.client.config
Class XmlClientConfigBuilder
java.lang.Object
com.hazelcast.config.AbstractConfigBuilder
com.hazelcast.config.AbstractXmlConfigHelper
com.hazelcast.config.AbstractXmlConfigBuilder
com.hazelcast.client.config.XmlClientConfigBuilder
Loads the
ClientConfig using XML.-
Nested Class Summary
Nested classes/interfaces inherited from class com.hazelcast.config.AbstractXmlConfigBuilder
AbstractXmlConfigBuilder.ConfigType -
Field Summary
Fields inherited from class com.hazelcast.config.AbstractXmlConfigHelper
domLevel3 -
Constructor Summary
ConstructorsConstructorDescriptionLoads the client config using the following resolution mechanism: first it checks if a system property 'hazelcast.client.config' is set.XmlClientConfigBuilder(com.hazelcast.client.config.impl.XmlClientConfigLocator locator) Constructs aXmlClientConfigBuilderthat loads the configuration with the providedXmlClientConfigLocator.XmlClientConfigBuilder(File file) XmlClientConfigBuilder(String resource) -
Method Summary
Modifier and TypeMethodDescriptionbuild()build(ClassLoader classLoader) protected AbstractXmlConfigBuilder.ConfigTypeprotected Documentparse(InputStream inputStream) Reads XML from InputStream and parses.setProperties(Properties properties) Methods inherited from class com.hazelcast.config.AbstractXmlConfigBuilder
getProperties, process, setPropertiesInternalMethods inherited from class com.hazelcast.config.AbstractXmlConfigHelper
appendToken, getNamespaceType, getReleaseVersion, loadSchemaFile, schemaValidation, xmlToJavaNameMethods inherited from class com.hazelcast.config.AbstractConfigBuilder
shouldValidateTheSchema
-
Constructor Details
-
XmlClientConfigBuilder
- Throws:
IOException
-
XmlClientConfigBuilder
- Throws:
IOException
-
XmlClientConfigBuilder
- Throws:
IOException
-
XmlClientConfigBuilder
-
XmlClientConfigBuilder
public XmlClientConfigBuilder()Loads the client config using the following resolution mechanism:- first it checks if a system property 'hazelcast.client.config' is set. If it exist and it begins with 'classpath:', then a classpath resource is loaded. Else it will assume it is a file reference. The configuration file or resource will be loaded only if the postfix of its name ends with `.xml`.
- it checks if a hazelcast-client.xml is available in the working dir
- it checks if a hazelcast-client.xml is available on the classpath
- it loads the hazelcast-client-default.xml
-
XmlClientConfigBuilder
@PrivateApi public XmlClientConfigBuilder(com.hazelcast.client.config.impl.XmlClientConfigLocator locator) Constructs aXmlClientConfigBuilderthat loads the configuration with the providedXmlClientConfigLocator.If the provided
XmlClientConfigLocatorisnull, a new instance is created and the config is located in every possible places. For these places, please seeXmlClientConfigLocator.If the provided
XmlClientConfigLocatoris notnull, 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
-
parse
Description copied from class:AbstractXmlConfigBuilderReads XML from InputStream and parses.- Specified by:
parsein classAbstractXmlConfigBuilder- Parameters:
inputStream-InputStreamto read from- Returns:
- Document after parsing XML
- Throws:
Exception- if the XML configuration cannot be parsed or is invalid
-
setProperties
-
getConfigType
- Specified by:
getConfigTypein classAbstractXmlConfigBuilder- Returns:
- ConfigType of current config class as enum value
-
build
-
build
-