jSyncManager Simple Java Server

org.jSyncManager.SJS.Adapters.SMTPServer.Config
Class ConfigDAOXML.PlayerHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.xml.sax.ext.DefaultHandler2
          extended by org.jSyncManager.SJS.Adapters.SMTPServer.Config.ConfigDAOXML.PlayerHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, org.xml.sax.ext.DeclHandler, org.xml.sax.ext.EntityResolver2, org.xml.sax.ext.LexicalHandler
Enclosing class:
ConfigDAOXML<T,ID extends java.io.Serializable>

public static final class ConfigDAOXML.PlayerHandler
extends org.xml.sax.ext.DefaultHandler2

Inner class which listens to SAX events to load a configuration from

Version:
$Revision$
Author:
$author$

Constructor Summary
ConfigDAOXML.PlayerHandler()
           
 
Method Summary
 void characters(char[] ch, int start, int length)
          Convenience method used to write an array of characters to the text buffer
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qname)
          Called when a closing tag is encountered.
 Configuration getConfiguration()
          Gets the loaded configuration object
 java.lang.String getText()
          Load the text and trim the text string nicely
 void startElement(java.lang.String namespaceURI, java.lang.String lname, java.lang.String qname, org.xml.sax.Attributes attrs)
          Opening tag of an XML element is encountered.
 
Methods inherited from class org.xml.sax.ext.DefaultHandler2
attributeDecl, comment, elementDecl, endCDATA, endDTD, endEntity, externalEntityDecl, getExternalSubset, internalEntityDecl, resolveEntity, resolveEntity, startCDATA, startDTD, startEntity
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigDAOXML.PlayerHandler

public ConfigDAOXML.PlayerHandler()
Method Detail

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String lname,
                         java.lang.String qname,
                         org.xml.sax.Attributes attrs)
Opening tag of an XML element is encountered. Load the attributes and store them for use later.

Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Parameters:
namespaceURI - namespace of element
lname - local name of the element
qname - qname of the element
attrs - the attributes of the element

endElement

public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String qname)
Called when a closing tag is encountered. Uses the attributes loaded when the start tag is encountered.

Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler
Parameters:
uri - namespace of the URI of the element
localName - local name of the element
qname - qname of the element

getText

public java.lang.String getText()
Load the text and trim the text string nicely

Returns:
string type of the text

characters

public void characters(char[] ch,
                       int start,
                       int length)
Convenience method used to write an array of characters to the text buffer

Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
Parameters:
ch - the characters to write to the text buffer
start - start offset of the data
length - end offset of the data

getConfiguration

public Configuration getConfiguration()
Gets the loaded configuration object

Returns:
returns the loaded configuration

jSyncManager Simple Java Server

Copyright (c) 2004 Brad BARCLAY. All Rights Reserved.