Package org.jupnp.transport.impl
Klasse PooledXmlProcessor
java.lang.Object
org.jupnp.transport.impl.PooledXmlProcessor
- Bekannte direkte Unterklassen:
GENAEventProcessorImpl,SOAPActionProcessorImpl
Abstract class responsible for creating new
Documents either for writing or already parsed from a given input
stream. The class manages a pool of DocumentBuilders internally and reuses them in different threads saving
CPU time from factory and builder instantiation if possible.
On Android this class will not reuse DocumentBuilders because the DocumentBuilder.reset()
implementation sets all internal properties to false
Default pool size is 20.
- Autor:
- Ivan Iliev - Initial contribution and API, Wouter Born - Detect if pooling is possible to fix issues on Android
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected Documentprotected DocumentreadDocument(InputSource inputSource) protected DocumentreadDocument(InputSource inputSource, ErrorHandler errorHandler)
-
Konstruktordetails
-
PooledXmlProcessor
protected PooledXmlProcessor() -
PooledXmlProcessor
protected PooledXmlProcessor(int basePoolSize)
-
-
Methodendetails
-
newDocument
protected Document newDocument() throws FactoryConfigurationError, ParserConfigurationException, SAXException, IOException- Gibt zurück:
- a new unused instance of
Document. - Löst aus:
FactoryConfigurationErrorParserConfigurationExceptionSAXExceptionIOException
-
readDocument
protected Document readDocument(InputSource inputSource, ErrorHandler errorHandler) throws FactoryConfigurationError, ParserConfigurationException, SAXException, IOException - Parameter:
inputSource- to parse fromerrorHandler- custom error handler for the parsing operation- Gibt zurück:
- The parsed
Documentinstance. - Löst aus:
FactoryConfigurationErrorParserConfigurationExceptionSAXExceptionIOException
-
readDocument
protected Document readDocument(InputSource inputSource) throws FactoryConfigurationError, ParserConfigurationException, SAXException, IOException - Parameter:
inputSource- to parse from- Gibt zurück:
- The parsed
Documentinstance. - Löst aus:
FactoryConfigurationErrorParserConfigurationExceptionSAXExceptionIOException
-