public class HalHttpMessageConverter extends org.springframework.http.converter.AbstractHttpMessageConverter<Object>
HttpMessageConverter implementation
that handles HAL representations
(application/hal+json and (application/hal+xml)
using the HALBuilder Representation| Modifier and Type | Field and Description |
|---|---|
static Charset |
CHARSET |
static org.springframework.http.MediaType |
HAL_JSON |
static org.springframework.http.MediaType |
HAL_XML |
| Constructor and Description |
|---|
HalHttpMessageConverter(com.theoryinpractise.halbuilder.api.RepresentationFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
void |
addModule(HalHttpMessageConverterModule module)
Add a
HalHttpMessageConverterModule
to handle a conversion |
boolean |
canRead(Class<?> type,
org.springframework.http.MediaType mediaType) |
boolean |
canWrite(Class<?> type,
org.springframework.http.MediaType mediaType) |
List<HalHttpMessageConverterModule> |
getModules()
Get the
HalHttpMessageConverterModule
modules registered with this converter. |
protected Object |
readInternal(Class<? extends Object> type,
org.springframework.http.HttpInputMessage message) |
protected boolean |
supports(Class<?> type) |
protected void |
writeInternal(Object target,
org.springframework.http.HttpOutputMessage outputMessage) |
public static final Charset CHARSET
public static org.springframework.http.MediaType HAL_JSON
public static org.springframework.http.MediaType HAL_XML
public HalHttpMessageConverter(com.theoryinpractise.halbuilder.api.RepresentationFactory factory)
public boolean canRead(Class<?> type, org.springframework.http.MediaType mediaType)
public boolean canWrite(Class<?> type, org.springframework.http.MediaType mediaType)
protected Object readInternal(Class<? extends Object> type, org.springframework.http.HttpInputMessage message) throws IOException, org.springframework.http.converter.HttpMessageNotReadableException
readInternal in class org.springframework.http.converter.AbstractHttpMessageConverter<Object>IOExceptionorg.springframework.http.converter.HttpMessageNotReadableExceptionprotected boolean supports(Class<?> type)
supports in class org.springframework.http.converter.AbstractHttpMessageConverter<Object>protected void writeInternal(Object target, org.springframework.http.HttpOutputMessage outputMessage) throws IOException, org.springframework.http.converter.HttpMessageNotWritableException
writeInternal in class org.springframework.http.converter.AbstractHttpMessageConverter<Object>IOExceptionorg.springframework.http.converter.HttpMessageNotWritableExceptionpublic void addModule(HalHttpMessageConverterModule module)
HalHttpMessageConverterModule
to handle a conversionmodule - public List<HalHttpMessageConverterModule> getModules()
HalHttpMessageConverterModule
modules registered with this converter.Copyright © 2013. All Rights Reserved.