com.espertech.esperio.socket.config
Class ConfigurationSocketAdapterParser

java.lang.Object
  extended by com.espertech.esperio.socket.config.ConfigurationSocketAdapterParser

public class ConfigurationSocketAdapterParser
extends java.lang.Object


Constructor Summary
ConfigurationSocketAdapterParser()
           
 
Method Summary
protected static void doConfigure(ConfigurationSocketAdapter configuration, org.w3c.dom.Document doc)
          Parse the W3C DOM document.
protected static void doConfigure(ConfigurationSocketAdapter configuration, java.io.InputStream stream, java.lang.String resourceName)
          Use the configuration specified in the given input stream.
protected static org.w3c.dom.Document getDocument(java.io.InputStream stream, java.lang.String resourceName)
          Returns the document.
protected static java.io.InputStream getResourceAsStream(java.lang.String resource)
          Returns an input stream from an application resource in the classpath.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationSocketAdapterParser

public ConfigurationSocketAdapterParser()
Method Detail

doConfigure

protected static void doConfigure(ConfigurationSocketAdapter configuration,
                                  java.io.InputStream stream,
                                  java.lang.String resourceName)
                           throws java.lang.RuntimeException
Use the configuration specified in the given input stream.

Parameters:
configuration - is the configuration object to populate
stream - Inputstream to be read from
resourceName - The name to use in warning/error messages
Throws:
java.lang.RuntimeException - is thrown when the configuration could not be parsed

getDocument

protected static org.w3c.dom.Document getDocument(java.io.InputStream stream,
                                                  java.lang.String resourceName)
                                           throws java.lang.RuntimeException
Returns the document.

Parameters:
stream - to read
resourceName - resource in stream
Returns:
document
Throws:
java.lang.RuntimeException - if the document could not be loaded or parsed

doConfigure

protected static void doConfigure(ConfigurationSocketAdapter configuration,
                                  org.w3c.dom.Document doc)
                           throws java.lang.RuntimeException
Parse the W3C DOM document.

Parameters:
configuration - is the configuration object to populate
doc - to parse
Throws:
java.lang.RuntimeException - to indicate parse errors

getResourceAsStream

protected static java.io.InputStream getResourceAsStream(java.lang.String resource)
Returns an input stream from an application resource in the classpath.

Parameters:
resource - to get input stream for
Returns:
input stream for resource

© 2006-2016 EsperTech Inc.
All rights reserved.
Visit us at espertech.com