Package de.odrotbohm.spring.web.mvc
Class MessageSourceResolvableHttpMessageConverter
java.lang.Object
org.springframework.http.converter.AbstractHttpMessageConverter<org.springframework.context.MessageSourceResolvable>
de.odrotbohm.spring.web.mvc.MessageSourceResolvableHttpMessageConverter
- All Implemented Interfaces:
org.springframework.http.converter.HttpMessageConverter<org.springframework.context.MessageSourceResolvable>
public class MessageSourceResolvableHttpMessageConverter
extends org.springframework.http.converter.AbstractHttpMessageConverter<org.springframework.context.MessageSourceResolvable>
An
HttpMessageConverter that immediately renders MessageSourceResolvable instances returned from a
Spring MVC controller as plain text if MediaType.TEXT_PLAIN is requested.- Author:
- Oliver Drotbohm
-
Field Summary
Fields inherited from class org.springframework.http.converter.AbstractHttpMessageConverter
logger -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanRead(org.springframework.http.MediaType mediaType) protected org.springframework.context.MessageSourceResolvablereadInternal(Class<? extends org.springframework.context.MessageSourceResolvable> clazz, org.springframework.http.HttpInputMessage inputMessage) protected booleanprotected voidwriteInternal(org.springframework.context.MessageSourceResolvable t, org.springframework.http.HttpOutputMessage outputMessage) Methods inherited from class org.springframework.http.converter.AbstractHttpMessageConverter
addDefaultHeaders, canRead, canWrite, canWrite, getContentLength, getDefaultCharset, getDefaultContentType, getSupportedMediaTypes, read, setDefaultCharset, setSupportedMediaTypes, writeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.http.converter.HttpMessageConverter
getSupportedMediaTypes
-
Method Details
-
supports
- Specified by:
supportsin classorg.springframework.http.converter.AbstractHttpMessageConverter<org.springframework.context.MessageSourceResolvable>
-
writeInternal
protected void writeInternal(org.springframework.context.MessageSourceResolvable t, org.springframework.http.HttpOutputMessage outputMessage) throws IOException, org.springframework.http.converter.HttpMessageNotWritableException - Specified by:
writeInternalin classorg.springframework.http.converter.AbstractHttpMessageConverter<org.springframework.context.MessageSourceResolvable>- Throws:
IOExceptionorg.springframework.http.converter.HttpMessageNotWritableException
-
canRead
protected boolean canRead(org.springframework.http.MediaType mediaType) - Overrides:
canReadin classorg.springframework.http.converter.AbstractHttpMessageConverter<org.springframework.context.MessageSourceResolvable>
-
readInternal
protected org.springframework.context.MessageSourceResolvable readInternal(Class<? extends org.springframework.context.MessageSourceResolvable> clazz, org.springframework.http.HttpInputMessage inputMessage) throws IOException, org.springframework.http.converter.HttpMessageNotReadableException - Specified by:
readInternalin classorg.springframework.http.converter.AbstractHttpMessageConverter<org.springframework.context.MessageSourceResolvable>- Throws:
IOExceptionorg.springframework.http.converter.HttpMessageNotReadableException
-