org.logicalcobwebs.proxool.configuration
Class JAXPConfigurator

java.lang.Object
  extended by org.logicalcobwebs.proxool.configuration.JAXPConfigurator

public class JAXPConfigurator
extends java.lang.Object

Configurator that uses JAXP to get a parser for Proxool configuration xml. The parser relies on JAXP version 1.1 or higher and is namespace aware.

See XMLConfigurator for the Proxool xml configuration format.

All the configure methods of this class takes a boolean argument describing whether the xml should be validated or not. If you want your xml to be validated be sure to read the Validation chapter in the JavaDoc for XMLConfigurator.

Since:
Proxool 0.6
Version:
$Revision: 1.11 $, $Date: 2004/05/14 21:15:47 $
Author:
Christian Nedregaard (christian_nedregaard@email.com), $Author: brenuart $ (current maintainer)

Field Summary
private static Log LOG
           
private static boolean NAMESPACE_AWARE
           
 
Constructor Summary
JAXPConfigurator()
           
 
Method Summary
static void configure(org.xml.sax.InputSource inputSource, boolean validate)
          Configure Proxool with xml from the given InputSource.
static void configure(java.io.Reader reader, boolean validate)
          Configure Proxool with xml from the given reader.
static void configure(java.lang.String xmlFileName, boolean validate)
          Configure Proxool with xml from the given file.
private static void setSAXFeature(org.xml.sax.XMLReader xmlReader, java.lang.String feature, boolean state)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final Log LOG

NAMESPACE_AWARE

private static final boolean NAMESPACE_AWARE
See Also:
Constant Field Values
Constructor Detail

JAXPConfigurator

public JAXPConfigurator()
Method Detail

configure

public static void configure(java.lang.String xmlFileName,
                             boolean validate)
                      throws ProxoolException
Configure Proxool with xml from the given file.

Parameters:
xmlFileName - the file to read xml from.
validate - true if the parsel shall be validating, and false otherwise.
Throws:
ProxoolException - if the configuration fails.

configure

public static void configure(org.xml.sax.InputSource inputSource,
                             boolean validate)
                      throws ProxoolException
Configure Proxool with xml from the given InputSource.

Parameters:
inputSource - the InputSource to read xml from.
validate - true if the parsel shall be validating, and false otherwise.
Throws:
ProxoolException - if the configuration fails.

configure

public static void configure(java.io.Reader reader,
                             boolean validate)
                      throws ProxoolException
Configure Proxool with xml from the given reader.

Parameters:
reader - the reader to read xml from.
validate - true if the parsel shall be validating, and false otherwise.
Throws:
ProxoolException - if the configuration fails.

setSAXFeature

private static void setSAXFeature(org.xml.sax.XMLReader xmlReader,
                                  java.lang.String feature,
                                  boolean state)