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
Nested ClassesModifier and TypeClassDescriptionstatic final classProvider for un-marshalling entities ofapplication/xmlmedia type into JAXB beans usingJAXB unmarshaller.static final classProvider for un-marshalling entities of<type>/<sub-type>+xmlmedia types into JAXB beans usingJAXB unmarshaller.static final classProvider for un-marshalling entities oftext/xmlmedia 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.JAXBContextgetStoredJaxbContext(Class type) Retrieve cached JAXB context capable of handling the given Java type.booleanisReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) booleanisWriteable(Class<?> arg0, Type arg1, Annotation[] arg2, MediaType mediaType) final ObjectreadFrom(Class<Object> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream inputStream) voidwriteTo(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, setHeaderMethods 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:AbstractJaxbProviderRetrieve cached JAXB context capable of handling the given Java type.- Overrides:
getStoredJaxbContextin 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:
IOExceptionWebApplicationException
-