public abstract class AbstractJaxb2HttpMessageConverter<T> extends AbstractXmlHttpMessageConverter<T>
HttpMessageConverters
that use JAXB2. Creates JAXBContext
object lazily.logger
Constructor and Description |
---|
AbstractJaxb2HttpMessageConverter() |
Modifier and Type | Method and Description |
---|---|
protected Marshaller |
createMarshaller(Class clazz)
Create a new
Marshaller for the given class. |
protected Unmarshaller |
createUnmarshaller(Class clazz)
Create a new
Unmarshaller for the given class. |
protected JAXBContext |
getJaxbContext(Class clazz)
Return a
JAXBContext for the given class. |
readFromSource, readInternal, transform, writeInternal, writeToResult
canRead, canRead, canWrite, canWrite, getContentLength, getDefaultContentType, getSupportedMediaTypes, read, setSupportedMediaTypes, supports, write
protected final Marshaller createMarshaller(Class clazz)
Marshaller
for the given class.clazz
- the class to create the marshaller forMarshaller
HttpMessageConversionException
- in case of JAXB errorsprotected final Unmarshaller createUnmarshaller(Class clazz) throws JAXBException
Unmarshaller
for the given class.clazz
- the class to create the unmarshaller forUnmarshaller
HttpMessageConversionException
- in case of JAXB errorsJAXBException
protected final JAXBContext getJaxbContext(Class clazz)
JAXBContext
for the given class.clazz
- the class to return the context forJAXBContext
HttpMessageConversionException
- in case of JAXB errors