public class RestXMLResponseParser extends RestResponseParser
Modifier and Type | Class and Description |
---|---|
private static class |
RestXMLResponseParser.RestXMLResponseFilter |
Modifier and Type | Field and Description |
---|---|
private static String |
ENTRY |
private static XMLInputFactory |
factory |
private static RestXMLResponseParser.RestXMLResponseFilter |
filter |
private static String |
MAP |
Constructor and Description |
---|
RestXMLResponseParser() |
Modifier and Type | Method and Description |
---|---|
private HashMap<String,String> |
getMapEntry(StartElement entry) |
RestActionReport |
parse(InputStream in)
Parse implementation for XML REST response.
|
private MessagePart |
parseChildMessage(XMLEventReader reader) |
private List<MessagePart> |
parseChildrenMessages(XMLEventReader reader) |
private Properties |
parseProperties(XMLEventReader reader) |
private RestActionReport |
parseReport(XMLEventReader reader) |
private List<? extends ActionReport> |
parseSubReports(XMLEventReader reader) |
private static final String ENTRY
private static final String MAP
private static final XMLInputFactory factory
private static final RestXMLResponseParser.RestXMLResponseFilter filter
public RestActionReport parse(InputStream in)
This implementation is based on Stax parser. Currently REST admin service does not use any schema for XML responses so this implementation is based on the code that generates the response on server side.
parse
in interface ResponseParser
parse
in class RestResponseParser
in
- private RestActionReport parseReport(XMLEventReader reader) throws XMLStreamException
XMLStreamException
private HashMap<String,String> getMapEntry(StartElement entry)
private List<MessagePart> parseChildrenMessages(XMLEventReader reader) throws XMLStreamException
XMLStreamException
private MessagePart parseChildMessage(XMLEventReader reader) throws XMLStreamException
XMLStreamException
private Properties parseProperties(XMLEventReader reader)
private List<? extends ActionReport> parseSubReports(XMLEventReader reader)
Copyright © 2013. All Rights Reserved.