org.apache.uima.simpleserver.config.impl
Class XmlConfigReader

java.lang.Object
  extended by org.apache.uima.simpleserver.config.impl.XmlConfigReader

public final class XmlConfigReader
extends java.lang.Object

Read server configuration from an XML file or stream.


Constructor Summary
XmlConfigReader()
           
 
Method Summary
static ServerSpec readServerSpec(java.io.File file)
          Read a config file.
static ServerSpec readServerSpec(java.io.InputStream is)
          Read a config XML stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlConfigReader

public XmlConfigReader()
Method Detail

readServerSpec

public static ServerSpec readServerSpec(java.io.File file)
                                 throws java.io.IOException,
                                        org.apache.xmlbeans.XmlException,
                                        SimpleServerException
Read a config file.

Parameters:
file - The config file.
Returns:
The corresponding server spec.
Throws:
java.io.IOException
org.apache.xmlbeans.XmlException - XML parsing error.
SimpleServerException - Content parsing error.

readServerSpec

public static ServerSpec readServerSpec(java.io.InputStream is)
                                 throws java.io.IOException,
                                        org.apache.xmlbeans.XmlException,
                                        SimpleServerException
Read a config XML stream.

Parameters:
is - The XML input stream.
Returns:
The corresponding server spec.
Throws:
java.io.IOException
org.apache.xmlbeans.XmlException - XML parsing error.
SimpleServerException - Content parsing error.


Copyright © 2011. All Rights Reserved.