|
BEA Systems, Inc. | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectweblogic.xml.stream.util.RecyclingFactory
public final class RecyclingFactory
Defines a factory that recycles instances of the XMLInputStream API. To request a recycled stream use the remove method. If no streams are present in the internal pool of streams the factory creates a new instance and returns it. The default internal pool holds on to a maximum of 32 streams. For this to work the instance of the static factory should be a singleton in your application. The optimal size of the pool should approximate the average number of concurrent threads in your application.
XMLInputStream,
ElementFilter,
XMLInputStreamFactory| Constructor Summary | |
|---|---|
RecyclingFactory()
Deprecated. Create a factory with the default pool size of 32 |
|
RecyclingFactory(int poolSize)
Deprecated. Create a factory with the specified size |
|
| Method Summary | |
|---|---|
boolean |
add(XMLInputStream stream)
Deprecated. Return a stream to the pool. |
static void |
main(String[] args)
Deprecated. |
XMLInputStream |
remove(InputStream stream)
Deprecated. Get a recycled XMLInputStream from the pool or create a new one |
XMLInputStream |
remove(InputStream stream,
ElementFilter filter)
Deprecated. Get a recycled XMLInputStream from the pool or create a new one and wrap it with the desired filter |
XMLInputStream |
remove(Reader reader)
Deprecated. Get a recycled XMLInputStream from the pool or create a new one |
XMLInputStream |
remove(Reader reader,
ElementFilter filter)
Deprecated. Get a recycled XMLInputStream from the pool or create a new one and wrap it with the desired filter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RecyclingFactory()
public RecyclingFactory(int poolSize)
poolSize - the size of the parser pool| Method Detail |
|---|
public XMLInputStream remove(InputStream stream)
throws XMLStreamException
stream - the stream of XML to read from
XMLStreamException
public XMLInputStream remove(Reader reader)
throws XMLStreamException
reader - the XML reader to read from
XMLStreamException
public XMLInputStream remove(InputStream stream,
ElementFilter filter)
throws XMLStreamException
stream - the stream of XML to read fromfilter - the ElementFilter to apply to the stream
XMLStreamException
public XMLInputStream remove(Reader reader,
ElementFilter filter)
throws XMLStreamException
reader - the XML reader to read fromfilter - the ElementFilter to apply to the stream
XMLStreamException
public boolean add(XMLInputStream stream)
throws XMLStreamException
stream - the XMLInputStream to return to the pool
XMLStreamException
public static void main(String[] args)
throws Exception
Exception
|
Because this information documents a Tech Preview of a BEA product, it may be incomplete and is subject to change. Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/essex/TechPreview Copyright 2007 BEA Systems Inc. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||