Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.openxri.config.impl
Class XMLServerConfig

    java.lang.Object
      org.xml.sax.helpers.DefaultHandler
          org.openxri.config.impl.XMLServerConfig

All Implemented Interfaces:
  ServerConfig, org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

    public class XMLServerConfig

extends org.xml.sax.helpers.DefaultHandler
implements ServerConfig

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.

Author:
  =peacekeeper

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` | `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

### SERVER_CONFIG_FILE

    public static final java.lang.String SERVER_CONFIG_FILE

See Also:
  Constant Field Values

### DEFAULT_SERVER_CONFIG_FILE

    public static final java.lang.String DEFAULT_SERVER_CONFIG_FILE

See Also:
  Constant Field Values

### NAMESPACE

    public static final java.lang.String NAMESPACE

See Also:
  Constant Field Values

### ELEMENT_CLASS

    public static final java.lang.String ELEMENT_CLASS

See Also:
  Constant Field Values

### ELEMENT_PROPERTIES

    public static final java.lang.String ELEMENT_PROPERTIES

See Also:
  Constant Field Values

### ELEMENT_PROPERTY

    public static final java.lang.String ELEMENT_PROPERTY

See Also:
  Constant Field Values

### ELEMENT_COMPONENT

    public static final java.lang.String ELEMENT_COMPONENT

See Also:
  Constant Field Values

### ELEMENT_PIPELINE

    public static final java.lang.String ELEMENT_PIPELINE

See Also:
  Constant Field Values

### ELEMENT_STAGE

    public static final java.lang.String ELEMENT_STAGE

See Also:
  Constant Field Values

### ATTR_PROPERTY_KEY

    public static final java.lang.String ATTR_PROPERTY_KEY

See Also:
  Constant Field Values

### ATTR_PROPERTY_VALUE

    public static final java.lang.String ATTR_PROPERTY_VALUE

See Also:
  Constant Field Values

### ATTR_COMPONENT_INTERFACE

    public static final java.lang.String ATTR_COMPONENT_INTERFACE

See Also:
  Constant Field Values

### ATTR_PIPELINE_NAME

    public static final java.lang.String ATTR_PIPELINE_NAME

See Also:
  Constant Field Values

### PIPELINE_DEFAULT_NAME

    public static final java.lang.String PIPELINE_DEFAULT_NAME

### PROPERTIES_KEY_HOSTNAME

    public static final java.lang.String PROPERTIES_KEY_HOSTNAME

See Also:
  Constant Field Values

### PROPERTIES_KEY_HOSTPORT

    public static final java.lang.String PROPERTIES_KEY_HOSTPORT

See Also:
  Constant Field Values

### PROPERTIES_KEY_SERVLETPATH

    public static final java.lang.String PROPERTIES_KEY_SERVLETPATH

See Also:
  Constant Field Values

Constructor Detail

### XMLServerConfig

    public XMLServerConfig(javax.servlet.ServletContext servletContext,
                           java.util.Properties properties)

Method Detail

### init

    public void init()
              throws java.io.IOException,
                     ConfigException

  Specified by:
    `init` in interface `ServerConfig`
  Throws:
    `java.io.IOException`
    `ConfigException`

### getProperties

    public java.util.Properties getProperties()

  Description copied from interface: `ServerConfig`
  Gets the server-wide properties.

  Specified by:
    `getProperties` in interface `ServerConfig`

### getComponentRegistry

    public ComponentRegistry getComponentRegistry()

  Description copied from interface: `ServerConfig`
  Gets the server's components.

  Specified by:
    `getComponentRegistry` in interface `ServerConfig`

### getPipelineRegistry

    public PipelineRegistry getPipelineRegistry()

  Description copied from interface: `ServerConfig`
  Gets the server's pipelines.

  Specified by:
    `getPipelineRegistry` in interface `ServerConfig`

### getHostName

    public java.lang.String getHostName()

  Description copied from interface: `ServerConfig`
  Gets the host name from the server-wide properties.

  Specified by:
    `getHostName` in interface `ServerConfig`

### getHostPort

    public java.lang.String getHostPort()

  Description copied from interface: `ServerConfig`
  Gets the host port from the server-wide properties.

  Specified by:
    `getHostPort` in interface `ServerConfig`

### getServletPath

    public java.lang.String getServletPath()

  Description copied from interface: `ServerConfig`
  Gets the servlet path from the server-wide properties.

  Specified by:
    `getServletPath` in interface `ServerConfig`

### parse

    protected void parse(org.xml.sax.InputSource input)
                  throws java.io.IOException,
                         ConfigException

  Throws:
    `java.io.IOException`
    `ConfigException`

### startDocument

    public void startDocument()
                       throws org.xml.sax.SAXException

  Specified by:
    `startDocument` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `startDocument` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### endDocument

    public void endDocument()
                     throws org.xml.sax.SAXException

  Specified by:
    `endDocument` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `endDocument` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### characters

    public void characters(char[] ch,
                           int start,
                           int length)
                    throws org.xml.sax.SAXException

  Specified by:
    `characters` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `characters` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### startElement

    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

  Specified by:
    `startElement` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `startElement` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### endElement

    public void endElement(java.lang.String namespaceURI,
                           java.lang.String localName,
                           java.lang.String qName)
                    throws org.xml.sax.SAXException

  Specified by:
    `endElement` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `endElement` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### error

    public void error(org.xml.sax.SAXParseException ex)
               throws org.xml.sax.SAXException

  Specified by:
    `error` in interface `org.xml.sax.ErrorHandler`
  Overrides:
    `error` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### fatalError

    public void fatalError(org.xml.sax.SAXParseException ex)
                    throws org.xml.sax.SAXException

  Specified by:
    `fatalError` in interface `org.xml.sax.ErrorHandler`
  Overrides:
    `fatalError` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### warning

    public void warning(org.xml.sax.SAXParseException ex)
                 throws org.xml.sax.SAXException

  Specified by:
    `warning` in interface `org.xml.sax.ErrorHandler`
  Overrides:
    `warning` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005-2009. All Rights Reserved.