Class XmlRootObjectJaxbProvider
java.lang.Object
org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider<T>
org.glassfish.jersey.jaxb.internal.AbstractJaxbProvider<Object>
org.glassfish.jersey.jaxb.internal.XmlRootObjectJaxbProvider
- All Implemented Interfaces:
MessageBodyReader<Object>
,MessageBodyWriter<Object>
- Direct Known Subclasses:
XmlRootObjectJaxbProvider.App
,XmlRootObjectJaxbProvider.General
,XmlRootObjectJaxbProvider.Text
Base XML-based message body reader for JAXB beans.
- Author:
- Paul Sandoz, Marek Potociar
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Provider for un-marshalling entities ofapplication/xml
media type into JAXB beans usingJAXB unmarshaller
.static final class
Provider for un-marshalling entities of<type>/<sub-type>+xml
media types into JAXB beans usingJAXB unmarshaller
.static final class
Provider for un-marshalling entities oftext/xml
media type into JAXB beans usingJAXB unmarshaller
. -
Field Summary
Fields inherited from class org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider
UTF8
-
Method Summary
Modifier and TypeMethodDescriptionprotected jakarta.xml.bind.JAXBContext
getStoredJaxbContext
(Class type) Retrieve cached JAXB context capable of handling the given Java type.boolean
isReadable
(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) boolean
isWriteable
(Class<?> arg0, Type arg1, Annotation[] arg2, MediaType mediaType) final Object
readFrom
(Class<Object> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream inputStream) void
writeTo
(Object arg0, Class<?> arg1, Type arg2, Annotation[] arg3, MediaType arg4, MultivaluedMap<String, Object> arg5, OutputStream arg6) Methods inherited from class org.glassfish.jersey.jaxb.internal.AbstractJaxbProvider
getMarshaller, getSAXSource, getUnmarshaller, isFormattedOutput, isSupported, isXmlRootElementProcessing, setConfiguration, setHeader
Methods inherited from class org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider
getCharset, getSize, readFromAsString, writeTo, writeTo, writeToAsString
-
Method Details
-
getStoredJaxbContext
protected jakarta.xml.bind.JAXBContext getStoredJaxbContext(Class type) throws jakarta.xml.bind.JAXBException Description copied from class:AbstractJaxbProvider
Retrieve cached JAXB context capable of handling the given Java type.- Overrides:
getStoredJaxbContext
in classAbstractJaxbProvider<Object>
- Parameters:
type
- Java type .- Returns:
- JAXB context associated with the Java type.
- Throws:
jakarta.xml.bind.JAXBException
- in case the JAXB context retrieval fails.
-
isReadable
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) -
readFrom
public final Object readFrom(Class<Object> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream inputStream) throws IOException- Throws:
IOException
-
isWriteable
-
writeTo
public void writeTo(Object arg0, Class<?> arg1, Type arg2, Annotation[] arg3, MediaType arg4, MultivaluedMap<String, Object> arg5, OutputStream arg6) throws IOException, WebApplicationException- Throws:
IOException
WebApplicationException
-