|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xml.ws.api.streaming.XMLStreamReaderFactory
public abstract class XMLStreamReaderFactory
Factory for XMLStreamReader.
This wraps XMLInputFactory and allows us to reuse XMLStreamReader instances
when appropriate.
| Nested Class Summary | |
|---|---|
static class |
XMLStreamReaderFactory.Default
Default XMLStreamReaderFactory implementation
that can work with any XMLInputFactory. |
static class |
XMLStreamReaderFactory.NoLock
Similar to XMLStreamReaderFactory.Default but doesn't do any synchronization. |
static interface |
XMLStreamReaderFactory.RecycleAware
Interface that can be implemented by XMLStreamReader to
be notified when it's recycled. |
static class |
XMLStreamReaderFactory.Woodstox
Handles Woodstox's XIF, but sets properties to do the string interning, sets various limits, ... |
| Constructor Summary | |
|---|---|
XMLStreamReaderFactory()
|
|
| Method Summary | |
|---|---|
static XMLStreamReader |
create(InputSource source,
boolean rejectDTDs)
|
static XMLStreamReader |
create(String systemId,
InputStream in,
boolean rejectDTDs)
|
static XMLStreamReader |
create(String systemId,
InputStream in,
String encoding,
boolean rejectDTDs)
|
static XMLStreamReader |
create(String systemId,
Reader reader,
boolean rejectDTDs)
|
abstract XMLStreamReader |
doCreate(String systemId,
InputStream in,
boolean rejectDTDs)
|
abstract XMLStreamReader |
doCreate(String systemId,
Reader reader,
boolean rejectDTDs)
|
abstract void |
doRecycle(XMLStreamReader r)
|
static XMLStreamReaderFactory |
get()
|
static void |
recycle(XMLStreamReader r)
Should be invoked when the code finished using an XMLStreamReader. |
static void |
set(XMLStreamReaderFactory f)
Overrides the singleton XMLStreamReaderFactory instance that
the JAX-WS RI uses. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLStreamReaderFactory()
| Method Detail |
|---|
public static void set(XMLStreamReaderFactory f)
XMLStreamReaderFactory instance that
the JAX-WS RI uses.
public static XMLStreamReaderFactory get()
public static XMLStreamReader create(InputSource source,
boolean rejectDTDs)
public static XMLStreamReader create(@Nullable
String systemId,
InputStream in,
boolean rejectDTDs)
public static XMLStreamReader create(@Nullable
String systemId,
InputStream in,
@Nullable
String encoding,
boolean rejectDTDs)
public static XMLStreamReader create(@Nullable
String systemId,
Reader reader,
boolean rejectDTDs)
public static void recycle(XMLStreamReader r)
XMLStreamReader.
If the recycled instance implements XMLStreamReaderFactory.RecycleAware,
XMLStreamReaderFactory.RecycleAware.onRecycled() will be invoked to let the instance
know that it's being recycled.
It is not a hard requirement to call this method on every XMLStreamReader
instance. Not doing so just reduces the performance by throwing away
possibly reusable instances. So the caller should always consider the effort
it takes to recycle vs the possible performance gain by doing so.
This method may be invoked by multiple threads concurrently.
r - The XMLStreamReader instance that the caller finished using.
This could be any XMLStreamReader implementation, not just
the ones that were created from this factory. So the implementation
of this class needs to be aware of that.
public abstract XMLStreamReader doCreate(String systemId,
InputStream in,
boolean rejectDTDs)
public abstract XMLStreamReader doCreate(String systemId,
Reader reader,
boolean rejectDTDs)
public abstract void doRecycle(XMLStreamReader r)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||