public class XMLParserPoolImpl extends java.lang.Object implements XMLParserPool
| Constructor and Description |
|---|
XMLParserPoolImpl()
Creates an instance that caches only parsers but not handlers.
|
XMLParserPoolImpl(boolean useHandlerCache)
Creates an instance that caches parsers and caches handlers as specified.
|
XMLParserPoolImpl(int size,
boolean useHandlerCache)
Creates an instance that caches parsers and caches handlers as specified.
|
| Modifier and Type | Method and Description |
|---|---|
javax.xml.parsers.SAXParser |
get(java.util.Map<java.lang.String,java.lang.Boolean> features,
java.util.Map<java.lang.String,?> properties,
boolean useLexicalHandler)
Retrieves a parser from the pool given specified properties and features.
|
XMLDefaultHandler |
getDefaultHandler(XMLResource resource,
XMLLoad xmlLoad,
XMLHelper helper,
java.util.Map<?,?> options)
Retrieves XMLDefaultHandler from the pool and initializes / prepares it.
|
protected javax.xml.parsers.SAXParser |
makeParser(java.util.Map<java.lang.String,java.lang.Boolean> features,
java.util.Map<java.lang.String,?> properties) |
void |
release(javax.xml.parsers.SAXParser parser,
java.util.Map<java.lang.String,java.lang.Boolean> features,
java.util.Map<java.lang.String,?> properties,
boolean useLexicalHandler)
Returns the parser to the pool.
|
void |
releaseDefaultHandler(XMLDefaultHandler handler,
java.util.Map<?,?> options)
Returns the XMLDefaultHandler to the pool.
|
public XMLParserPoolImpl()
XMLParserPoolImpl(boolean)public XMLParserPoolImpl(boolean useHandlerCache)
useHandlerCache - indicates whether handler caching should be use.XMLParserPoolImpl(boolean)public XMLParserPoolImpl(int size,
boolean useHandlerCache)
size - indicates the maximum number of instances parser or handler instances that will be cached.useHandlerCache - indicates whether handler caching should be use.XMLParserPoolImpl(boolean)public javax.xml.parsers.SAXParser get(java.util.Map<java.lang.String,java.lang.Boolean> features,
java.util.Map<java.lang.String,?> properties,
boolean useLexicalHandler)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException
XMLParserPoolget in interface XMLParserPoolfeatures - a map of the parser features and their values.properties - a map of a parser properties and their values.useLexicalHandler - whether a lexical handler was set during loading.javax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXExceptionXMLParserPool.get(Map, Map, boolean)public void release(javax.xml.parsers.SAXParser parser,
java.util.Map<java.lang.String,java.lang.Boolean> features,
java.util.Map<java.lang.String,?> properties,
boolean useLexicalHandler)
XMLParserPoolrelease in interface XMLParserPoolparser - the parser to return to the pool.features - a map of the parser features and their values.properties - a map of a parser properties and their values.useLexicalHandler - whether a lexical handler was set during loading.XMLParserPool.release(SAXParser, Map, Map, boolean)protected javax.xml.parsers.SAXParser makeParser(java.util.Map<java.lang.String,java.lang.Boolean> features,
java.util.Map<java.lang.String,?> properties)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXExceptionpublic XMLDefaultHandler getDefaultHandler(XMLResource resource, XMLLoad xmlLoad, XMLHelper helper, java.util.Map<?,?> options)
XMLParserPoolgetDefaultHandler in interface XMLParserPoolresource - - the resourcexmlLoad - - the XMLLoadhelper - - XMLHelperpublic void releaseDefaultHandler(XMLDefaultHandler handler, java.util.Map<?,?> options)
XMLParserPoolreleaseDefaultHandler in interface XMLParserPoolhandler - the handler to return to the poolCopyright © 2018. Licensed under the Eclipse Public License v1.0. All rights reserved.
Submit a bug or feature