com.hazelcast.client.config
Class XmlClientConfigBuilder

java.lang.Object
  extended by com.hazelcast.config.AbstractXmlConfigHelper
      extended by com.hazelcast.config.AbstractConfigBuilder
          extended by com.hazelcast.client.config.XmlClientConfigBuilder

public class XmlClientConfigBuilder
extends AbstractConfigBuilder

Loads the ClientConfig using XML.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.hazelcast.config.AbstractConfigBuilder
AbstractConfigBuilder.ConfigType
 
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
XmlClientConfigBuilder()
          Loads the client config using the following resolution mechanism: first it checks if a system property 'hazelcast.client.config' is set.
XmlClientConfigBuilder(File file)
           
XmlClientConfigBuilder(InputStream in)
           
XmlClientConfigBuilder(String resource)
           
XmlClientConfigBuilder(URL url)
           
 
Method Summary
 ClientConfig build()
           
 ClientConfig build(ClassLoader classLoader)
           
protected  Properties getProperties()
           
protected  AbstractConfigBuilder.ConfigType getXmlType()
           
protected  Document parse(InputStream inputStream)
          Reads xml from InputStream and parses
 void setProperties(Properties properties)
           
 
Methods inherited from class com.hazelcast.config.AbstractConfigBuilder
process
 
Methods inherited from class com.hazelcast.config.AbstractXmlConfigHelper
appendToken, checkTrue, cleanNodeName, cleanNodeName, fillDataSerializableFactories, fillNativeMemoryConfig, fillPortableFactories, fillProperties, fillSerializers, getAttribute, getIntegerValue, getLongValue, getNamespaceType, getReleaseVersion, getTextContent, hasTextContent, loadSchemaFile, parseSerialization, parseSocketInterceptorConfig, schemaValidation, xmlToJavaName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlClientConfigBuilder

public XmlClientConfigBuilder(String resource)
                       throws IOException
Throws:
IOException

XmlClientConfigBuilder

public XmlClientConfigBuilder(File file)
                       throws IOException
Throws:
IOException

XmlClientConfigBuilder

public XmlClientConfigBuilder(URL url)
                       throws IOException
Throws:
IOException

XmlClientConfigBuilder

public XmlClientConfigBuilder(InputStream in)

XmlClientConfigBuilder

public XmlClientConfigBuilder()
Loads the client config using the following resolution mechanism:
  1. 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
  2. it checks if a hazelcast-client.xml is available in the working dir
  3. it checks if a hazelcast-client.xml is available on the classpath
  4. it loads the hazelcast-client-default.xml

Method Detail

parse

protected Document parse(InputStream inputStream)
                  throws Exception
Description copied from class: AbstractConfigBuilder
Reads xml from InputStream and parses

Specified by:
parse in class AbstractConfigBuilder
Returns:
Document after parsing xml
Throws:
Exception

getProperties

protected Properties getProperties()
Specified by:
getProperties in class AbstractConfigBuilder
Returns:
system properties

setProperties

public void setProperties(Properties properties)

getXmlType

protected AbstractConfigBuilder.ConfigType getXmlType()
Specified by:
getXmlType in class AbstractConfigBuilder
Returns:
ConfigType of current config class as enum value.

build

public ClientConfig build()

build

public ClientConfig build(ClassLoader classLoader)


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