|
deegree-services-3.0-pre-nightly (2010/03/05 00:04) - official | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.commons.xml.XMLAdapter org.deegree.services.controller.exception.serializer.XMLExceptionSerializer<T>
T
- the exception which will be serialized, a subtype of ControllerException
public abstract class XMLExceptionSerializer<T extends ControllerException>
The XMLExceptionSerializer
class TODO add class documentation here.
Field Summary |
---|
Fields inherited from class org.deegree.commons.xml.XMLAdapter |
---|
DEFAULT_URL, nsContext, rootElement, XLN_NS |
Constructor Summary | |
---|---|
XMLExceptionSerializer()
|
Method Summary | |
---|---|
void |
serializeException(OutputStream outputStream,
T exception,
String requestedEncoding)
Wraps a FormattingXMLStreamWriter around the given output stream and calls
serializeExceptionToXML(XMLStreamWriter, ControllerException) . |
abstract void |
serializeExceptionToXML(XMLStreamWriter writer,
T exception)
Implementations can use the xml writer to serialize the given exception as a specific xml representation. |
Methods inherited from class org.deegree.commons.xml.XMLAdapter |
---|
evaluateXPath, getElement, getElements, getNamespaceContext, getNode, getNodeAsBoolean, getNodeAsDouble, getNodeAsFloat, getNodeAsInt, getNodeAsQName, getNodeAsString, getNodeAsURL, getNodeAsVersion, getNodes, getNodesAsQNames, getNodesAsStrings, getRequiredElement, getRequiredElements, getRequiredNode, getRequiredNodeAsBoolean, getRequiredNodeAsDouble, getRequiredNodeAsFloat, getRequiredNodeAsInteger, getRequiredNodeAsQName, getRequiredNodeAsString, getRequiredNodeAsURL, getRequiredNodeAsVersion, getRequiredNodes, getRootElement, getSchemas, getSystemId, hasSchemas, load, load, load, load, load, maybeWriteElement, maybeWriteElementNS, parseBoolean, parseDouble, parseFloat, parseInt, parseQName, parseSimpleLink, parseURL, resolve, setRootElement, setSystemId, toString, writeElement, writeElement, writeElement, writeElement, writeElement, writeOptionalAttribute, writeOptionalElement, writeOptionalNSAttribute |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public XMLExceptionSerializer()
Method Detail |
---|
public final void serializeException(OutputStream outputStream, T exception, String requestedEncoding) throws IOException
FormattingXMLStreamWriter
around the given output stream and calls
serializeExceptionToXML(XMLStreamWriter, ControllerException)
. The writer will prepare namespaces and
will start and end the XML document.
serializeException
in interface ExceptionSerializer<T extends ControllerException>
outputStream
- which will be wrapped.exception
- which must be serializedrequestedEncoding
- of the stream
IOException
- if an error occurred while writing to the stream.public abstract void serializeExceptionToXML(XMLStreamWriter writer, T exception) throws XMLStreamException
writer
- a formatting xml writer, wrapped around an output stream.exception
- to serialize
XMLStreamException
- if an error occurred while serializing the given exception.
|
deegree-services-3.0-pre-nightly (2010/03/05 00:04) - official | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |