Skip navigation links

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.2.1)

Part Number E55141-01
P4 Change 1723563 on 2015/10/09


weblogic.xml.stream.util
Class RecyclingFactory

java.lang.Object
  extended by weblogic.xml.stream.util.RecyclingFactory


Deprecated. please use java standard StAX api

public final class RecyclingFactory
extends Object

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.

Since:
XMLInputStream 1.0
See Also:
XMLInputStream, ElementFilter, XMLInputStreamFactory

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

 

Method Detail

remove

public XMLInputStream remove(InputStream stream)
                      throws XMLStreamException
Deprecated. 
Get a recycled XMLInputStream from the pool or create a new one
Parameters:
stream - the stream of XML to read from
Throws:
XMLStreamException

remove

public XMLInputStream remove(Reader reader)
                      throws XMLStreamException
Deprecated. 
Get a recycled XMLInputStream from the pool or create a new one
Parameters:
reader - the XML reader to read from
Throws:
XMLStreamException

remove

public XMLInputStream remove(InputStream stream,
                             ElementFilter filter)
                      throws XMLStreamException
Deprecated. 
Get a recycled XMLInputStream from the pool or create a new one and wrap it with the desired filter
Parameters:
stream - the stream of XML to read from
filter - the ElementFilter to apply to the stream
Throws:
XMLStreamException

remove

public XMLInputStream remove(Reader reader,
                             ElementFilter filter)
                      throws XMLStreamException
Deprecated. 
Get a recycled XMLInputStream from the pool or create a new one and wrap it with the desired filter
Parameters:
reader - the XML reader to read from
filter - the ElementFilter to apply to the stream
Throws:
XMLStreamException

add

public boolean add(XMLInputStream stream)
            throws XMLStreamException
Deprecated. 
Return a stream to the pool. Returns true if the stream was added to the pool and false if it wasn't.
Parameters:
stream - the XMLInputStream to return to the pool
Throws:
XMLStreamException

main

public static void main(String[] args)
                 throws Exception
Deprecated. 
Throws:
Exception

Skip navigation links

Copyright 1996, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.2.1)

Part Number E55141-01
P4 Change 1723563 on 2015/10/09