public class TypeConstrainedMappingJackson2HttpMessageConverter extends MappingJackson2HttpMessageConverter
MappingJackson2HttpMessageConverter to constrain the ability to read and write HTTP message
based on the target type. Useful in case the ObjectMapper about to be configured has customizations that
sholny be applied to object trees of a certain base type.DEFAULT_CHARSETlogger| Constructor and Description |
|---|
TypeConstrainedMappingJackson2HttpMessageConverter(Class<?> type)
Creates a new
TypeConstrainedMappingJackson2HttpMessageConverter for the given type. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRead(Class<?> clazz,
MediaType mediaType) |
boolean |
canWrite(Class<?> clazz,
MediaType mediaType) |
canRead, getJavaType, getJsonEncoding, getObjectMapper, read, readInternal, setJsonPrefix, setObjectMapper, setPrefixJson, setPrettyPrint, supports, writeInternalcanRead, canWrite, getContentLength, getDefaultContentType, getSupportedMediaTypes, read, setSupportedMediaTypes, writeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSupportedMediaTypes, read, writepublic TypeConstrainedMappingJackson2HttpMessageConverter(Class<?> type)
TypeConstrainedMappingJackson2HttpMessageConverter for the given type.type - must not be null.public boolean canRead(Class<?> clazz, MediaType mediaType)
canRead in interface HttpMessageConverter<Object>canRead in class MappingJackson2HttpMessageConverterpublic boolean canWrite(Class<?> clazz, MediaType mediaType)
canWrite in interface HttpMessageConverter<Object>canWrite in class MappingJackson2HttpMessageConverterCopyright © 2012-2015–2015 Pivotal, Inc.. All rights reserved.