Constructor and Description |
---|
JaxbHttpMessageConverter() |
JaxbHttpMessageConverter(String packagesToInclude)
Create a JAXB message converter, specifying the Java packages it should use to find JAXB classes
|
Modifier and Type | Method and Description |
---|---|
boolean |
canRead(Class<?> clazz,
org.springframework.http.MediaType mediaType) |
boolean |
canWrite(Class<?> clazz,
org.springframework.http.MediaType mediaType) |
protected boolean |
canWrite(org.springframework.http.MediaType mediaType) |
protected Marshaller |
createMarshaller(Class<?> clazz)
Creates a new
Marshaller for the given class. |
protected Unmarshaller |
createUnmarshaller(Class<?> clazz)
Creates a new
Unmarshaller for the given class. |
protected JAXBContext |
getJaxbContext(Class<?> clazz)
Returns a
JAXBContext for the given class. |
protected Object |
readFromSource(Class<?> clazz,
org.springframework.http.HttpHeaders headers,
Source source) |
protected boolean |
supports(Class<?> clazz) |
protected void |
writeToResult(Object o,
org.springframework.http.HttpHeaders headers,
Result result) |
readInternal, transform, writeInternal
public JaxbHttpMessageConverter()
public JaxbHttpMessageConverter(String packagesToInclude)
packagesToInclude
- A colon-separated list of package names.JAXBContext.newInstance(String)
public boolean canRead(Class<?> clazz, org.springframework.http.MediaType mediaType)
public boolean canWrite(Class<?> clazz, org.springframework.http.MediaType mediaType)
protected boolean supports(Class<?> clazz)
supports
in class org.springframework.http.converter.AbstractHttpMessageConverter<Object>
protected boolean canWrite(org.springframework.http.MediaType mediaType)
canWrite
in class org.springframework.http.converter.AbstractHttpMessageConverter<Object>
protected Object readFromSource(Class<?> clazz, org.springframework.http.HttpHeaders headers, Source source) throws IOException
readFromSource
in class org.springframework.http.converter.xml.AbstractXmlHttpMessageConverter<Object>
IOException
protected void writeToResult(Object o, org.springframework.http.HttpHeaders headers, Result result) throws IOException
writeToResult
in class org.springframework.http.converter.xml.AbstractXmlHttpMessageConverter<Object>
IOException
protected final Marshaller createMarshaller(Class<?> clazz)
Marshaller
for the given class.clazz
- the class to create the marshaller forMarshaller
org.springframework.http.converter.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
org.springframework.http.converter.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
org.springframework.http.converter.HttpMessageConversionException
- in case of JAXB errorsCopyright © 2005–2017 Alfresco Software. All rights reserved.