fr.dyade.aaa.agent.conf
Class A3CMLSaxWrapper

java.lang.Object
  extended byorg.xml.sax.helpers.DefaultHandler
      extended byfr.dyade.aaa.agent.conf.A3CMLSaxWrapper
All Implemented Interfaces:
A3CMLWrapper, org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class A3CMLSaxWrapper
extends org.xml.sax.helpers.DefaultHandler
implements A3CMLWrapper

XML SAX Wrapper for A3 configuration file.


Field Summary
protected  A3CMLConfig a3cmlConfig
           
protected  org.objectweb.util.monolog.api.Logger logmon
           
 
Constructor Summary
A3CMLSaxWrapper()
           
 
Method Summary
 void endDocument()
          Finalizes parsing of a document.
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String rawName)
          Receive notification of the end of an element.
 void error(org.xml.sax.SAXParseException e)
          Handles notification of a recoverable parser error.
 void fatalError(org.xml.sax.SAXParseException e)
          Handles notification of a non-recoverable parser error.
 A3CMLConfig parse(java.io.Reader cfgReader, java.lang.String cfgName)
          Parses the xml file named cfgFileName and calls handler methods.
 void startDocument()
          Initializes parsing of a document.
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String rawName, org.xml.sax.Attributes atts)
          Receive notification of the start of an element.
 void warning(org.xml.sax.SAXParseException e)
          Handles notification of a parser warning.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, 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

logmon

protected org.objectweb.util.monolog.api.Logger logmon

a3cmlConfig

protected A3CMLConfig a3cmlConfig
Constructor Detail

A3CMLSaxWrapper

public A3CMLSaxWrapper()
Method Detail

parse

public A3CMLConfig parse(java.io.Reader cfgReader,
                         java.lang.String cfgName)
                  throws java.lang.Exception
Parses the xml file named cfgFileName and calls handler methods. Calls only methode startDocument(), startElement, endElement and endDocument.

Specified by:
parse in interface A3CMLWrapper
Parameters:
cfgName - the name of the configuration
Throws:
java.lang.Exception - unspecialized error

fatalError

public void fatalError(org.xml.sax.SAXParseException e)
                throws org.xml.sax.SAXException
Handles notification of a non-recoverable parser error.

Specified by:
fatalError in interface org.xml.sax.ErrorHandler
Parameters:
e - The warning information encoded as an exception.
Throws:
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

error

public void error(org.xml.sax.SAXParseException e)
           throws org.xml.sax.SAXException
Handles notification of a recoverable parser error.

Specified by:
error in interface org.xml.sax.ErrorHandler
Parameters:
e - The warning information encoded as an exception.
Throws:
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

warning

public void warning(org.xml.sax.SAXParseException e)
             throws org.xml.sax.SAXException
Handles notification of a parser warning.

Specified by:
warning in interface org.xml.sax.ErrorHandler
Parameters:
e - The warning information encoded as an exception.
Throws:
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
Initializes parsing of a document.

Specified by:
startDocument in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException - unspecialized error

startElement

public void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String rawName,
                         org.xml.sax.Attributes atts)
                  throws org.xml.sax.SAXException
Receive notification of the start of an element.

Specified by:
startElement in interface org.xml.sax.ContentHandler
Parameters:
uri - The Namespace URI
localName - The local name
rawName - The qualified name
atts - The attributes attached to the element.
Throws:
org.xml.sax.SAXException - unspecialized error

endElement

public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String rawName)
                throws org.xml.sax.SAXException
Receive notification of the end of an element.

Specified by:
endElement in interface org.xml.sax.ContentHandler
Parameters:
uri - The Namespace URI
localName - The local name
rawName - The qualified name
Throws:
org.xml.sax.SAXException - unspecialized error

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
Finalizes parsing of a document.

Specified by:
endDocument in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException - unspecialized error


Copyright ? 2004 Scalagent - All rights reserved