|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ebmwebsourcing.easycommons.xml.DocumentBuilders
public final class DocumentBuilders
A static pool of DocumentBuilder to improve DocumentBuilder creation efficiency.
A DocumentBuilder is initialized the first time this class is used.
An infinite number (integer maximum value) of DocumentBuilder may be created. They are never evicted.
| Constructor Summary | |
|---|---|
DocumentBuilders()
|
|
| Method Summary | |
|---|---|
static org.w3c.dom.Document |
newDocument()
Create a new Document (with a DocumentBuilder of the
pool) |
static void |
releaseDocumentBuilder(javax.xml.parsers.DocumentBuilder documentBuilder)
Release a DocumentBuilder to the pool |
static javax.xml.parsers.DocumentBuilder |
takeDocumentBuilder()
Take a DocumentBuilder from the pool |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DocumentBuilders()
| Method Detail |
|---|
public static final javax.xml.parsers.DocumentBuilder takeDocumentBuilder()
throws PoolException
DocumentBuilder from the pool
DocumentBuilder
PoolException - if the current thread waits for a DocumentBuilder
of the pool and is interruptedpublic static final void releaseDocumentBuilder(javax.xml.parsers.DocumentBuilder documentBuilder)
DocumentBuilder to the pool
documentBuilder - a DocumentBuilder to releasepublic static final org.w3c.dom.Document newDocument()
Document (with a DocumentBuilder of the
pool)
Document
PoolException - if the current thread waits for a DocumentBuilder of
the pool and is interrupted when the PoolPolicy is
WAIT or if there is no more available DocumentBuilder
in the DocumentBuilder pool when the
PoolPolicy is REJECT
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||