TopoWeb Commons API

org.topoweb.xml
Class Factory.Components

java.lang.Object
  |
  +--org.topoweb.xml.Factory.Components
Enclosing class:
Factory

protected static class Factory.Components
extends java.lang.Object

Encapsulates the XML component factories shipped with the runtime. Each instance is accessed by a single thread. The factories returned by each instance are supposed to be loaded lazily. The object stored in Factory.threadLocal is an instance of Components.

See Also:
Factory.newComponents()

Constructor Summary
protected Factory.Components()
           
 
Method Summary
 javax.xml.parsers.DocumentBuilder getDocumentBuilder()
          Always returns the same DocumentBuilder instance in any given thread.
 javax.xml.parsers.DocumentBuilderFactory getDocumentBuilderFactory()
          Always returns the same DocumentBuilderFactory instance in any given thread.
 javax.xml.transform.TransformerFactory getTransformerFactory()
          Always returns the same TransformerFactory instance in any given thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Factory.Components

protected Factory.Components()
Method Detail

getTransformerFactory

public javax.xml.transform.TransformerFactory getTransformerFactory()
Always returns the same TransformerFactory instance in any given thread.

Returns:
a thread-specific TransformerFactory

getDocumentBuilderFactory

public javax.xml.parsers.DocumentBuilderFactory getDocumentBuilderFactory()
                                                                   throws javax.xml.parsers.ParserConfigurationException
Always returns the same DocumentBuilderFactory instance in any given thread.

Returns:
a thread-specific DocumentBuilderFactory
javax.xml.parsers.ParserConfigurationException

getDocumentBuilder

public javax.xml.parsers.DocumentBuilder getDocumentBuilder()
                                                     throws javax.xml.parsers.ParserConfigurationException
Always returns the same DocumentBuilder instance in any given thread.

Returns:
a thread-specific DocumentBuilder
javax.xml.parsers.ParserConfigurationException

TopoWeb Commons API

Copyright (C) 2002 Babak Farhang

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.