|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.openxri.config.impl.XMLServerConfig
public class XMLServerConfig
This class parses the XML configuration file and then contains all information from that file. It also holds an instance of ComponentRegistry and PipelineRegistry, which are fully initialized once the ServerConfig object is constructed.
| Field Summary | |
|---|---|
static java.lang.String |
ATTR_COMPONENT_INTERFACE
|
static java.lang.String |
ATTR_PIPELINE_NAME
|
static java.lang.String |
ATTR_PROPERTY_KEY
|
static java.lang.String |
ATTR_PROPERTY_VALUE
|
static java.lang.String |
DEFAULT_SERVER_CONFIG_FILE
|
static java.lang.String |
ELEMENT_CLASS
|
static java.lang.String |
ELEMENT_COMPONENT
|
static java.lang.String |
ELEMENT_PIPELINE
|
static java.lang.String |
ELEMENT_PROPERTIES
|
static java.lang.String |
ELEMENT_PROPERTY
|
static java.lang.String |
ELEMENT_STAGE
|
static java.lang.String |
NAMESPACE
|
static java.lang.String |
PIPELINE_DEFAULT_NAME
|
static java.lang.String |
PROPERTIES_KEY_HOSTNAME
|
static java.lang.String |
PROPERTIES_KEY_HOSTPORT
|
static java.lang.String |
PROPERTIES_KEY_SERVLETPATH
|
static java.lang.String |
SERVER_CONFIG_FILE
|
| Constructor Summary | |
|---|---|
XMLServerConfig(javax.servlet.ServletContext servletContext,
java.util.Properties properties)
|
|
| Method Summary | |
|---|---|
void |
characters(char[] ch,
int start,
int length)
|
void |
endDocument()
|
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
|
void |
error(org.xml.sax.SAXParseException ex)
|
void |
fatalError(org.xml.sax.SAXParseException ex)
|
ComponentRegistry |
getComponentRegistry()
Gets the server's components. |
java.lang.String |
getHostName()
Gets the host name from the server-wide properties. |
java.lang.String |
getHostPort()
Gets the host port from the server-wide properties. |
PipelineRegistry |
getPipelineRegistry()
Gets the server's pipelines. |
java.util.Properties |
getProperties()
Gets the server-wide properties. |
java.lang.String |
getRealPath(java.lang.String relativePath)
Gets the absolute path for a path relative to the web application. |
java.lang.String |
getServletPath()
Gets the servlet path from the server-wide properties. |
void |
init()
|
protected void |
parse(org.xml.sax.InputSource input)
|
void |
startDocument()
|
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
|
void |
warning(org.xml.sax.SAXParseException ex)
|
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
|---|
endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String SERVER_CONFIG_FILE
public static final java.lang.String DEFAULT_SERVER_CONFIG_FILE
public static final java.lang.String NAMESPACE
public static final java.lang.String ELEMENT_CLASS
public static final java.lang.String ELEMENT_PROPERTIES
public static final java.lang.String ELEMENT_PROPERTY
public static final java.lang.String ELEMENT_COMPONENT
public static final java.lang.String ELEMENT_PIPELINE
public static final java.lang.String ELEMENT_STAGE
public static final java.lang.String ATTR_PROPERTY_KEY
public static final java.lang.String ATTR_PROPERTY_VALUE
public static final java.lang.String ATTR_COMPONENT_INTERFACE
public static final java.lang.String ATTR_PIPELINE_NAME
public static final java.lang.String PIPELINE_DEFAULT_NAME
public static final java.lang.String PROPERTIES_KEY_HOSTNAME
public static final java.lang.String PROPERTIES_KEY_HOSTPORT
public static final java.lang.String PROPERTIES_KEY_SERVLETPATH
| Constructor Detail |
|---|
public XMLServerConfig(javax.servlet.ServletContext servletContext,
java.util.Properties properties)
| Method Detail |
|---|
public void init()
throws java.io.IOException,
ConfigException
init in interface ServerConfigjava.io.IOException
ConfigExceptionpublic java.util.Properties getProperties()
ServerConfig
getProperties in interface ServerConfigpublic ComponentRegistry getComponentRegistry()
ServerConfig
getComponentRegistry in interface ServerConfigpublic PipelineRegistry getPipelineRegistry()
ServerConfig
getPipelineRegistry in interface ServerConfigpublic java.lang.String getHostName()
ServerConfig
getHostName in interface ServerConfigpublic java.lang.String getHostPort()
ServerConfig
getHostPort in interface ServerConfigpublic java.lang.String getServletPath()
ServerConfig
getServletPath in interface ServerConfigpublic java.lang.String getRealPath(java.lang.String relativePath)
ServerConfig
getRealPath in interface ServerConfig
protected void parse(org.xml.sax.InputSource input)
throws java.io.IOException,
ConfigException
java.io.IOException
ConfigException
public void startDocument()
throws org.xml.sax.SAXException
startDocument in interface org.xml.sax.ContentHandlerstartDocument in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException
public void endDocument()
throws org.xml.sax.SAXException
endDocument in interface org.xml.sax.ContentHandlerendDocument in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException
public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
characters in interface org.xml.sax.ContentHandlercharacters in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException
public void startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
throws org.xml.sax.SAXException
startElement in interface org.xml.sax.ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException
public void endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
throws org.xml.sax.SAXException
endElement in interface org.xml.sax.ContentHandlerendElement in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException
public void error(org.xml.sax.SAXParseException ex)
throws org.xml.sax.SAXException
error in interface org.xml.sax.ErrorHandlererror in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException
public void fatalError(org.xml.sax.SAXParseException ex)
throws org.xml.sax.SAXException
fatalError in interface org.xml.sax.ErrorHandlerfatalError in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException
public void warning(org.xml.sax.SAXParseException ex)
throws org.xml.sax.SAXException
warning in interface org.xml.sax.ErrorHandlerwarning in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||