| java.lang.Object com.quadcap.server.ServerConfigParser
ServerConfigParser | public class ServerConfigParser implements DocumentHandler,ErrorHandler(Code) | | Parser the server.xml file to determine which services
should be loaded on startup.
author: Stan Bailes |
INIT | final static int INIT(Code) | | |
INIT_PARAMETER | final static int INIT_PARAMETER(Code) | | |
LOAD_ON_STARTUP | final static int LOAD_ON_STARTUP(Code) | | |
PARAM_NAME | final static int PARAM_NAME(Code) | | |
PARAM_VALUE | final static int PARAM_VALUE(Code) | | |
SERVER | final static int SERVER(Code) | | |
SERVICE | final static int SERVICE(Code) | | |
SERVICE_CLASS | final static int SERVICE_CLASS(Code) | | |
SERVICE_CONFIG | final static int SERVICE_CONFIG(Code) | | |
SERVICE_NAME | final static int SERVICE_NAME(Code) | | |
ServerConfigParser | public ServerConfigParser(ServiceContainer c) throws Exception(Code) | | No-argument constructor. The new object needs a database connection
before it can do anything useful.
exception: Exception - may be thrown if there's a problem constructingthe XML parser. |
addServices | final void addServices() throws SAXException(Code) | | At the end of the file, add the services in the specified order
|
characters | public void characters(char[] ch, int start, int length) throws SAXException(Code) | | SAX parser callback to handle character data found in the
parsed document.
Parameters: ch - the buffer containing the parsed characters. Parameters: star - the buffer position of the first character Parameters: length - the number of characters exception: SAXException - may be thrown if this data representsa database value and there's a SQL exception thrown whiletrying to update the underlying resultset object with thisdata. |
consume | final String consume()(Code) | | Get and return all of the accumulated character data as a String.
Reset the character data buffer to be empty.
|
endDocument | public void endDocument()(Code) | | SAX parser callback function that is called when the end of the
document is reached. This implementation does nothing.
|
endElement | public void endElement(String name) throws SAXException(Code) | | SAX parser callback function called for the end of an element.
If this element
represents the <database> element, we finish up
by closing the active statement. If this element represents a table
row element, we insert the current row. Otherwise, we do nothing.
Parameters: name - the name of this element exception: SAXException - may be thrown to wrap any underlying databaseexception. |
error | public void error(SAXParseException exception)(Code) | | SAX parser callback to handle XML Parser errors.
This implementation just prints them
to System.err.
Parameters: exception - the exception generated by the parser. |
fatalError | public void fatalError(SAXParseException exception)(Code) | | SAX parser callback to handle XML Parser fatal errors.
This implementation just prints them
to System.err.
Parameters: exception - the exception generated by the parser. |
ignorableWhitespace | public void ignorableWhitespace(char[] ch, int start, int length)(Code) | | SAX parser callback for ignorable whitespace. We just ignore it
Parameters: ch - the buffer containing the parsed characters. Parameters: star - the buffer position of the first character Parameters: length - the number of characters |
parse | public void parse(String fileName) throws Exception(Code) | | Parse the specified file
exception: may - be thrown |
processingInstruction | public void processingInstruction(String target, String data)(Code) | | SAX parser callback for processing instructions. This implementation
does nothing.
Parameters: target - the processing instruction target. Parameters: data - the processing instruction data. |
setDocumentLocator | public void setDocumentLocator(Locator locator)(Code) | | SAX parser callback used to receive a document locator.
Parameters: locator - the parser's locator object. |
startDocument | public void startDocument()(Code) | | SAX parser callback for document start.
This implementation does nothing.
|
startElement | public void startElement(String name, AttributeList attrs) throws SAXException(Code) | | SAX parser callback for the start of an element. If this element
represents a table row, and the table is different from the last
table seen, we establish an updatable ResultSet for the
new table which can be used to insert new rows into the table.
If this element represents a table row, we move to the insert row.
If this element represents a column, we remember the column name.
Parameters: name - the element name Parameters: attrs - the element's attributes exception: SAXException - may be thrown to wrap an underlying databaseerror, or if there is a problem with the XML document itself. |
warning | public void warning(SAXParseException exception)(Code) | | SAX parser callback to handle XML Parser fatal errors.
This implementation just prints them
to System.err.
Parameters: exception - the exception generated by the parser. |
|
|