org.n52.security.common.xml
Class DefaultDocumentBuilderPool

java.lang.Object
  extended by org.n52.security.common.xml.DefaultDocumentBuilderPool
All Implemented Interfaces:
DocumentBuilderPool

public class DefaultDocumentBuilderPool
extends java.lang.Object
implements DocumentBuilderPool

Class DocumentBuilderPool implements a pool for document builders.

The class makes use of a GenericKeyedObjectPool, which comes out of the commons-pool library, to implement the parser pool.

Currently the pooling settings are hard coded, e.g. the total size and max idle count, but the settings shall meet the most requirements.

Version:
$Revision: $
Author:
Marko Reiprecht Created on 24.03.2008

Constructor Summary
DefaultDocumentBuilderPool()
          Constructor creates a new instance.
 
Method Summary
 javax.xml.parsers.DocumentBuilder acquire(DOMParserOptions options)
          Method acquires a DocumentBuilder with meets the requirements expressed by the options.
 void release(javax.xml.parsers.DocumentBuilder builder, DOMParserOptions options)
          Method releases a DocumentBuilder, wich was acquired using the parser options.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDocumentBuilderPool

public DefaultDocumentBuilderPool()
Constructor creates a new instance.

Method Detail

acquire

public javax.xml.parsers.DocumentBuilder acquire(DOMParserOptions options)
Description copied from interface: DocumentBuilderPool
Method acquires a DocumentBuilder with meets the requirements expressed by the options.

Specified by:
acquire in interface DocumentBuilderPool
Parameters:
options - the options.
Returns:
DocumentBuilder.
See Also:
DocumentBuilderPool.acquire(DOMParserOptions)

release

public void release(javax.xml.parsers.DocumentBuilder builder,
                    DOMParserOptions options)
Description copied from interface: DocumentBuilderPool
Method releases a DocumentBuilder, wich was acquired using the parser options.

Specified by:
release in interface DocumentBuilderPool
Parameters:
builder - the builder.
options - the options.
See Also:
DocumentBuilderPool.release(DocumentBuilder, DOMParserOptions)


Copyright © 2004-2009 52north.org. All Rights Reserved.