|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.xml.ws.api.streaming.XMLStreamWriterFactory
public abstract class XMLStreamWriterFactory
Factory for XMLStreamWriter
.
This wraps XMLOutputFactory
and allows us to reuse XMLStreamWriter
instances
when appropriate.
Nested Class Summary | |
---|---|
static class |
XMLStreamWriterFactory.Default
Default XMLStreamWriterFactory implementation
that can work with any XMLOutputFactory . |
static class |
XMLStreamWriterFactory.NoLock
For XMLOutputFactory is thread safe. |
static interface |
XMLStreamWriterFactory.RecycleAware
Interface that can be implemented by XMLStreamWriter to
be notified when it's recycled. |
static class |
XMLStreamWriterFactory.Zephyr
XMLStreamWriterFactory implementation for Sun's StaX implementation. |
Constructor Summary | |
---|---|
XMLStreamWriterFactory()
|
Method Summary | |
---|---|
static javax.xml.stream.XMLStreamWriter |
create(java.io.OutputStream out)
Short-cut for create(OutputStream, String) with UTF-8. |
static javax.xml.stream.XMLStreamWriter |
create(java.io.OutputStream out,
java.lang.String encoding)
|
static javax.xml.stream.XMLStreamWriter |
createXMLStreamWriter(java.io.OutputStream out)
Deprecated. Use create(OutputStream) |
static javax.xml.stream.XMLStreamWriter |
createXMLStreamWriter(java.io.OutputStream out,
java.lang.String encoding)
Deprecated. Use create(OutputStream, String) |
static javax.xml.stream.XMLStreamWriter |
createXMLStreamWriter(java.io.OutputStream out,
java.lang.String encoding,
boolean declare)
Deprecated. Use create(OutputStream, String) . The boolean flag was unused anyway. |
abstract javax.xml.stream.XMLStreamWriter |
doCreate(java.io.OutputStream out)
See create(OutputStream) for the contract. |
abstract javax.xml.stream.XMLStreamWriter |
doCreate(java.io.OutputStream out,
java.lang.String encoding)
See create(OutputStream,String) for the contract. |
abstract void |
doRecycle(javax.xml.stream.XMLStreamWriter r)
See recycle(XMLStreamWriter) for the contract. |
static XMLStreamWriterFactory |
get()
Gets the singleton instance. |
static void |
recycle(javax.xml.stream.XMLStreamWriter r)
Should be invoked when the code finished using an XMLStreamWriter . |
static void |
set(XMLStreamWriterFactory f)
Overrides the singleton XMLStreamWriterFactory 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 XMLStreamWriterFactory()
Method Detail |
---|
public abstract javax.xml.stream.XMLStreamWriter doCreate(java.io.OutputStream out)
create(OutputStream)
for the contract.
This method may be invoked concurrently.
public abstract javax.xml.stream.XMLStreamWriter doCreate(java.io.OutputStream out, java.lang.String encoding)
create(OutputStream,String)
for the contract.
This method may be invoked concurrently.
public abstract void doRecycle(javax.xml.stream.XMLStreamWriter r)
recycle(XMLStreamWriter)
for the contract.
This method may be invoked concurrently.
public static void recycle(javax.xml.stream.XMLStreamWriter r)
XMLStreamWriter
.
If the recycled instance implements XMLStreamWriterFactory.RecycleAware
,
XMLStreamWriterFactory.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 invked 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.@NotNull public static XMLStreamWriterFactory get()
public static void set(@NotNull XMLStreamWriterFactory f)
XMLStreamWriterFactory
instance that
the JAX-WS RI uses.
f
- must not be null.public static javax.xml.stream.XMLStreamWriter create(java.io.OutputStream out)
create(OutputStream, String)
with UTF-8.
public static javax.xml.stream.XMLStreamWriter create(java.io.OutputStream out, java.lang.String encoding)
public static javax.xml.stream.XMLStreamWriter createXMLStreamWriter(java.io.OutputStream out)
create(OutputStream)
public static javax.xml.stream.XMLStreamWriter createXMLStreamWriter(java.io.OutputStream out, java.lang.String encoding)
create(OutputStream, String)
public static javax.xml.stream.XMLStreamWriter createXMLStreamWriter(java.io.OutputStream out, java.lang.String encoding, boolean declare)
create(OutputStream, String)
. The boolean flag was unused anyway.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |