Class JettisonJaxbElementProvider
java.lang.Object
org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider<T>
org.glassfish.jersey.jaxb.internal.AbstractJaxbProvider<jakarta.xml.bind.JAXBElement<?>>
org.glassfish.jersey.jaxb.internal.AbstractJaxbElementProvider
org.glassfish.jersey.jettison.internal.entity.JettisonJaxbElementProvider
- All Implemented Interfaces:
MessageBodyReader<jakarta.xml.bind.JAXBElement<?>>
,MessageBodyWriter<jakarta.xml.bind.JAXBElement<?>>
- Direct Known Subclasses:
JettisonJaxbElementProvider.App
,JettisonJaxbElementProvider.General
JSON message entity media type provider (reader & writer) for
JAXBElement
type.- Author:
- Jakub Podlesak
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
static final class
-
Field Summary
Fields inherited from class org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider
UTF8
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isReadable
(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) boolean
isWriteable
(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) protected final jakarta.xml.bind.JAXBElement<?>
readFrom
(Class<?> type, MediaType mediaType, jakarta.xml.bind.Unmarshaller unmarshaller, InputStream entityStream) Read JAXB element from an entity stream.protected final void
writeTo
(jakarta.xml.bind.JAXBElement<?> t, MediaType mediaType, Charset c, jakarta.xml.bind.Marshaller m, OutputStream entityStream) Write JAXB element to an entity stream.Methods inherited from class org.glassfish.jersey.jaxb.internal.AbstractJaxbElementProvider
readFrom, writeTo
Methods inherited from class org.glassfish.jersey.jaxb.internal.AbstractJaxbProvider
getMarshaller, getSAXSource, getStoredJaxbContext, getUnmarshaller, isFormattedOutput, isSupported, isXmlRootElementProcessing, setConfiguration, setHeader
Methods inherited from class org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider
getCharset, getSize, readFromAsString, writeTo, writeTo, writeToAsString
-
Method Details
-
isReadable
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) - Specified by:
isReadable
in interfaceMessageBodyReader<jakarta.xml.bind.JAXBElement<?>>
- Overrides:
isReadable
in classAbstractJaxbElementProvider
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) - Specified by:
isWriteable
in interfaceMessageBodyWriter<jakarta.xml.bind.JAXBElement<?>>
- Overrides:
isWriteable
in classAbstractJaxbElementProvider
-
readFrom
protected final jakarta.xml.bind.JAXBElement<?> readFrom(Class<?> type, MediaType mediaType, jakarta.xml.bind.Unmarshaller unmarshaller, InputStream entityStream) throws jakarta.xml.bind.JAXBException Description copied from class:AbstractJaxbElementProvider
Read JAXB element from an entity stream.- Specified by:
readFrom
in classAbstractJaxbElementProvider
- Parameters:
type
- the type that is to be read from the entity stream.mediaType
- the media type of the HTTP entity.unmarshaller
- JAXB unmarshaller to be used.entityStream
- theInputStream
of the HTTP entity. The caller is responsible for ensuring that the input stream ends when the entity has been consumed. The implementation should not close the input stream.- Returns:
- JAXB element representing the entity.
- Throws:
jakarta.xml.bind.JAXBException
- in case entity unmarshalling fails.
-
writeTo
protected final void writeTo(jakarta.xml.bind.JAXBElement<?> t, MediaType mediaType, Charset c, jakarta.xml.bind.Marshaller m, OutputStream entityStream) throws jakarta.xml.bind.JAXBException Description copied from class:AbstractJaxbElementProvider
Write JAXB element to an entity stream.- Specified by:
writeTo
in classAbstractJaxbElementProvider
- Parameters:
t
- JAXB element to be written to an entity stream.mediaType
- the media type of the HTTP entity.c
- character set to be used.m
- JAXB unmarshaller to be used.entityStream
- theInputStream
of the HTTP entity. The caller is responsible for ensuring that the input stream ends when the entity has been consumed. The implementation should not close the input stream.- Throws:
jakarta.xml.bind.JAXBException
- in case entity marshalling fails.
-