Package org.jclouds.http.functions
Class ParseXMLWithJAXB<T>
java.lang.Object
org.jclouds.http.functions.ParseXMLWithJAXB<T>
- All Implemented Interfaces:
com.google.common.base.Function<HttpResponse,
,T> Function<HttpResponse,
T>
@Singleton
public class ParseXMLWithJAXB<T>
extends Object
implements com.google.common.base.Function<HttpResponse,T>
This object will parse the body of an HttpResponse and return the result of
type back to the caller.
works with invalid reference
JAXBContext
Class
objects instead of
.
This could be a limitation if we are trying to parse typed collections of
objects. However, when using JAXB we expect to have well formed XML documents
with one single root element, so the objects to parse should not be
collections but objects that wrap collections of elements, and that should
work fine.invalid reference
Type
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply
(InputStream stream) <V> V
apply
(InputStream stream, Class<V> type) apply
(HttpResponse from) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.common.base.Function
equals
-
Field Details
-
logger
-
xml
-
type
-
-
Constructor Details
-
ParseXMLWithJAXB
-
-
Method Details
-
apply
- Specified by:
apply
in interfacecom.google.common.base.Function<HttpResponse,
T> - Specified by:
apply
in interfaceFunction<HttpResponse,
T>
-
apply
- Throws:
IOException
-
apply
- Throws:
IOException
-