iCMS.pollerd
Class XMLReader
java.lang.Object
org.xml.sax.helpers.DefaultHandler
luky.xml.SaxMapper
iCMS.pollerd.XMLReader
- All Implemented Interfaces:
- ContentHandler, DTDHandler, EntityResolver, ErrorHandler
public class XMLReader
- extends SaxMapper
This class reads an xml file with the cms configuration, it tries to stay
compliant with the old cms-basic format but there are some restrictions,
First of all this reader is much more strict, thus files should start
as a proper xml file, not as a generated luky script. Second the & symbol
can not be used, use escape characters or just write and. Third the include
tag is no longer supported, copy all data in one file. Also are applications
should to suply a symbolic name and columns (or locations) must suply a name.
Nodes are no longer logged under a name, the hostname replaces it, the old
style is still compatible
The biggest change is the propagation of application statuses within a
nodetype. These are no longer supported as seperate tag, but as attribute
of the application tag. (where they belong), consider using probe instead
of status (depricated) as it is actually a status probe, and not a status
The folowing tags are
supported:
/cms/mibpath
/cms/mib
/cms/logging
/cms/snmpconfig
/cms/nodetypes/nodetype
/cms/nodetypes/nodetype/mib
/cms/nodetypes/nodetype/status
/cms/nodetypes/nodetype/probe
/cms/nodetypes/nodetype/status/snmp
/cms/nodetypes/nodetype/probe/snmp
/cms/nodetypes/nodetype/status/ping
/cms/nodetypes/nodetype/probe/ping
/cms/nodetypes/nodetype/status/fixed
/cms/nodetypes/nodetype/probe/fixed
/cms/nodetypes/nodetype/applicationtype
/cms/nodetypes/nodetype/application
/cms/applicationtypes/applicationtype
/cms/applicationtypes/application
/cms/applicationtypes/applicationtype/mib
/cms/applicationtypes/application/mib
/cms/applicationtypes/applicationtype/status
/cms/applicationtypes/application/descr
/cms/applicationtypes/application/probe
/cms/applicationtypes/applicationtype/status/snmp
/cms/applicationtypes/application/probe/snmp
/cms/applicationtypes/applicationtype/status/ping
/cms/applicationtypes/application/probe/ping
/cms/applicationtypes/applicationtype/status/fixed
/cms/applicationtypes/application/probe/fixed
/cms/column
/cms/location
/cms/location/descr
/cms/column/nodegroup
/cms/location/nodegroup
/cms/location/nodegroup/desc
/cms/column/nodegroup/node
/cms/location/nodegroup/node
/cms/location/nodegroup/node/desc
Revision Changes :
- 1.0.0 - initial version
- 2.0.0 - Release for GPL as iCMS
- 2.0.1 - Added parental awareness
- 2.0.2 - Fixed bug when setting info in non existing probe
- 2.0.3 - A probe in a nodetype can now be set no propagation
- Version:
- 2.0.3
- Author:
- Chris Lukassen
-

Methods inherited from class org.xml.sax.helpers.DefaultHandler |
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 |
XMLReader
public XMLReader()
getMappedObject
public Object getMappedObject()
- Specified by:
getMappedObject
in class SaxMapper
createTagTrackerNetwork
public TagTracker createTagTrackerNetwork()
- Specified by:
createTagTrackerNetwork
in class SaxMapper
startParsing
public static void startParsing(String fileName)