Interface MessageConverter
-
- All Known Implementing Classes:
AbstractMessageConverter
,JsonMessageConverter
,XmlMessageConverter
public interface MessageConverter
消息转换接口- Since:
- JDK 1.6
- Author:
- jinyu
- See Also:
JsonMessageConverter
,XmlMessageConverter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canConvert(Class<?> clazz, HttpResponse response)
是否可以转换<T> T
convert(Class<? extends T> clazz, HttpResponse response)
转换消息List<MimeType>
supportedMimeTypes()
获取可以转换的媒体类型
-
-
-
Method Detail
-
canConvert
boolean canConvert(Class<?> clazz, HttpResponse response)
是否可以转换- Parameters:
clazz
- 转换类型response
- 响应对象- Returns:
- 是否标识
-
convert
<T> T convert(Class<? extends T> clazz, HttpResponse response) throws IOException
转换消息- Parameters:
clazz
- 转换类型response
- 响应对象- Returns:
- 消息对象
- Throws:
IOException
-
-