|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xml.sax.helpers.DefaultHandler org.objectweb.cjdbc.controller.xml.ControllerParser
Allows to parse an XML content containing the description of the controller confirming to C-JDBC-controller.dtd.
Field Summary | |
private ControllerFactory |
config
C-JDBC controller to setup. |
private Controller |
controller
|
private java.lang.String |
controllerIP
|
(package private) static Trace |
logger
Logger instance. |
private ReportManager |
manager
|
private boolean |
parseAccept
|
private org.xml.sax.XMLReader |
parser
XML parser. |
private ControllerSecurityManager |
security
|
private SSLConfiguration |
ssl
|
Constructor Summary | |
ControllerParser(ControllerFactory configure)
Creates a new ControllerParser instance. |
Method Summary | |
private void |
configureClient(org.xml.sax.Attributes atts)
Configure a ControllerXmlTags.ELT_CLIENT element. |
private void |
configureConsole(org.xml.sax.Attributes atts)
Configure a ControllerXmlTags.ELT_CONSOLE element. |
private void |
configureController(org.xml.sax.Attributes atts)
Configure a ControllerXmlTags.ELT_CONTROLLER element. |
private void |
configureHttpJmxAdaptor(org.xml.sax.Attributes atts)
Configure a ControllerXmlTags.ELT_HTTP_JMX_ADAPTOR element. |
private void |
configureIpRange(org.xml.sax.Attributes atts)
Configure a ControllerXmlTags.ELT_IPRANGE element. |
private void |
configureReport(org.xml.sax.Attributes atts)
Configure a ControllerXmlTags.ELT_REPORT element. |
private void |
configureRmiJmxAdaptor(org.xml.sax.Attributes atts)
Configure a ControllerXmlTags.ELT_RMI_JMX_ADAPTOR element. |
private void |
configureSSL(org.xml.sax.Attributes atts)
Configure a ControllerXmlTags.ELT_SSL element. |
private void |
configureVirtualDatabase(org.xml.sax.Attributes atts)
Configure a ControllerXmlTags.ELT_VIRTUAL_DATABASE element. |
void |
endDocument()
Finalizes parsing of a document. |
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String name)
DatabasesParser for end of 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. |
void |
readXML(java.io.FileReader fileReader,
boolean validateBeforeParsing)
Parses an XML formatted file according to C-JDBC-controller DTD. |
void |
readXML(java.lang.String xml)
Parses an XML content according to C-JDBC-controller DTD. |
void |
readXML(java.lang.String xml,
boolean validateBeforeParsing)
Parses an XML formatted string according to C-JDBC-controller DTD. |
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
Allows to parse the document with a local copy of the DTD whatever the original DOCTYPE found. |
void |
startDocument()
Initializes parsing of a document. |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String name,
org.xml.sax.Attributes atts)
Analyzes an element first line. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
characters, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static Trace logger
private org.xml.sax.XMLReader parser
private ControllerFactory config
private ControllerSecurityManager security
private Controller controller
private boolean parseAccept
private SSLConfiguration ssl
private java.lang.String controllerIP
private ReportManager manager
Constructor Detail |
public ControllerParser(ControllerFactory configure) throws java.lang.Exception
ControllerParser
instance. This method
Instanciates also a new ControllerHandler
.
configure
- a ControllerFactory
object that contains
the configuration to update with values from xml parsing
java.lang.Exception
- if an error occursMethod Detail |
public void readXML(java.lang.String xml) throws java.io.IOException, org.xml.sax.SAXException
xml
- a String
containing the XML content to parse
org.xml.sax.SAXException
- if an error occurs
java.io.IOException
- if an error occurspublic void readXML(java.lang.String xml, boolean validateBeforeParsing) throws java.io.IOException, org.xml.sax.SAXException
xml
- a String
reference to the xml to parsevalidateBeforeParsing
- if validation should be checked before parsing
org.xml.sax.SAXException
- if an error occurs
java.io.IOException
- if an error occurspublic void readXML(java.io.FileReader fileReader, boolean validateBeforeParsing) throws java.io.IOException, org.xml.sax.SAXException
fileReader
- a FileReader
reference to the xml to parsevalidateBeforeParsing
- if validation should be checked before parsing
org.xml.sax.SAXException
- if an error occurs
java.io.IOException
- if an error occurspublic void fatalError(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
e
- the warning information encoded as an exception.
org.xml.sax.SAXException
- any SAX exception, possibly wrapping another
exception.public void error(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
e
- the warning information encoded as an exception.
org.xml.sax.SAXException
- any SAX exception, possibly wrapping another
exceptionpublic org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException
DOCTYPE
found. Warning, this method is called only
if the XML document contains a DOCTYPE
.
org.xml.sax.SAXException
EntityResolver.resolveEntity(java.lang.String,
java.lang.String)
public void startDocument() throws org.xml.sax.SAXException
org.xml.sax.SAXException
- unspecialized errorpublic void endDocument() throws org.xml.sax.SAXException
org.xml.sax.SAXException
- unspecialized errorpublic void startElement(java.lang.String uri, java.lang.String localName, java.lang.String name, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
uri
- name space URIlocalName
- local namename
- element raw nameatts
- element attributes
org.xml.sax.SAXException
- if an error occurspublic void endElement(java.lang.String uri, java.lang.String localName, java.lang.String name) throws org.xml.sax.SAXException
uri
- name space URIlocalName
- local namename
- element raw name
org.xml.sax.SAXException
- if an error occursprivate void configureClient(org.xml.sax.Attributes atts)
ControllerXmlTags.ELT_CLIENT
element.
atts
- the parser attributesprivate void configureConsole(org.xml.sax.Attributes atts)
ControllerXmlTags.ELT_CONSOLE
element.
atts
- the parser attributesprivate void configureController(org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
ControllerXmlTags.ELT_CONTROLLER
element.
atts
- the parser attributes
org.xml.sax.SAXException
- if an error occursprivate void configureHttpJmxAdaptor(org.xml.sax.Attributes atts)
ControllerXmlTags.ELT_HTTP_JMX_ADAPTOR
element.
atts
- the parser attributesprivate void configureIpRange(org.xml.sax.Attributes atts)
ControllerXmlTags.ELT_IPRANGE
element.
atts
- the parser attributesprivate void configureReport(org.xml.sax.Attributes atts)
ControllerXmlTags.ELT_REPORT
element.
atts
- the parser attributesprivate void configureRmiJmxAdaptor(org.xml.sax.Attributes atts)
ControllerXmlTags.ELT_RMI_JMX_ADAPTOR
element.
atts
- the parser attributesprivate void configureSSL(org.xml.sax.Attributes atts)
ControllerXmlTags.ELT_SSL
element.
atts
- the parser attributesprivate void configureVirtualDatabase(org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
ControllerXmlTags.ELT_VIRTUAL_DATABASE
element.
atts
- the parser attributes
org.xml.sax.SAXException
- if an error occurs
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |