Package repast.simphony.integration
Class MessageCenterHandler
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- repast.simphony.integration.MessageCenterHandler
-
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
public class MessageCenterHandler extends DefaultHandler
A handler for XML parsing errors that forwards the errors on to the MessageCenter.- Author:
- Jerry Vos
-
-
Constructor Summary
Constructors Constructor Description MessageCenterHandler()
Constructs a default MessageCenterHandler.MessageCenterHandler(String fileName)
Constructs a MessageCenterHandler that will include the specified file name in the messages it outputs.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
error(SAXParseException e)
void
fatalError(SAXParseException e)
void
warning(SAXParseException e)
-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl
-
-
-
-
Constructor Detail
-
MessageCenterHandler
public MessageCenterHandler()
Constructs a default MessageCenterHandler. This will not include a file name in its messages.
-
MessageCenterHandler
public MessageCenterHandler(String fileName)
Constructs a MessageCenterHandler that will include the specified file name in the messages it outputs.- Parameters:
fileName
- the name of the file this handler is working on, to be included in any messages output
-
-
Method Detail
-
error
public void error(SAXParseException e) throws SAXException
- Specified by:
error
in interfaceErrorHandler
- Overrides:
error
in classDefaultHandler
- Throws:
SAXException
-
fatalError
public void fatalError(SAXParseException e) throws SAXException
- Specified by:
fatalError
in interfaceErrorHandler
- Overrides:
fatalError
in classDefaultHandler
- Throws:
SAXException
-
warning
public void warning(SAXParseException e) throws SAXException
- Specified by:
warning
in interfaceErrorHandler
- Overrides:
warning
in classDefaultHandler
- Throws:
SAXException
-
-