com.philemonworks.selfdiagnose
Class SelfDiagnoseHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by com.philemonworks.selfdiagnose.SelfDiagnoseHandler
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler

public class SelfDiagnoseHandler
extends DefaultHandler

SelfDiagnoseHandler is a SAX handler that can read the configuration xml file called selfdiagnose.xml that conforms to the XSD selfdiagnose-2.0.xsd

Author:
E.M.Micklei

Constructor Summary
SelfDiagnoseHandler()
           
 
Method Summary
static void addBindingFor(Class diagnosticTaskClass)
          Register a DiagnosticTask with an XML tag (which is constructed from the short class name in lowercase).
 void endElement(String uri, String localName, String name)
           
 void startElement(String uri, String localName, String qName, Attributes attributes)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, 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

SelfDiagnoseHandler

public SelfDiagnoseHandler()
Method Detail

addBindingFor

public static void addBindingFor(Class diagnosticTaskClass)
Register a DiagnosticTask with an XML tag (which is constructed from the short class name in lowercase). If the configuration has an element named by this tag then a new DiagnosticTask is created and initialized by the handler.

Parameters:
diagnosticTaskClass - Class must be concrete subclass of DiagnosticTask

startElement

public void startElement(String uri,
                         String localName,
                         String qName,
                         Attributes attributes)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class DefaultHandler
Throws:
SAXException

endElement

public void endElement(String uri,
                       String localName,
                       String name)
                throws SAXException
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class DefaultHandler
Throws:
SAXException


Copyright © 2012. All Rights Reserved.