public class Jackson2JsonMessageParser extends Object
JsonInboundMessageMapper.JsonMessageParser
implementation that parses JSON messages
and builds a Message
with the specified payload type from provided JsonInboundMessageMapper
.
Uses Jackson 2 JSON-processor (@link https://github.com/FasterXML).Constructor and Description |
---|
Jackson2JsonMessageParser() |
Jackson2JsonMessageParser(Jackson2JsonObjectMapper objectMapper) |
Modifier and Type | Method and Description |
---|---|
protected com.fasterxml.jackson.core.JsonParser |
createJsonParser(String jsonMessage) |
Message<?> |
doInParser(JsonInboundMessageMapper messageMapperToUse,
String jsonMessage,
Map<String,Object> headers) |
protected MessageBuilderFactory |
getMessageBuilderFactory() |
protected Message<?> |
parseWithHeaders(com.fasterxml.jackson.core.JsonParser parser,
String jsonMessage,
Map<String,Object> headersToAdd) |
protected Object |
readHeader(P parser,
String headerName,
String jsonMessage) |
protected Object |
readPayload(P parser,
String jsonMessage) |
void |
setBeanFactory(BeanFactory beanFactory) |
public Jackson2JsonMessageParser()
public Jackson2JsonMessageParser(Jackson2JsonObjectMapper objectMapper)
protected com.fasterxml.jackson.core.JsonParser createJsonParser(String jsonMessage)
protected Message<?> parseWithHeaders(com.fasterxml.jackson.core.JsonParser parser, String jsonMessage, @Nullable Map<String,Object> headersToAdd)
public void setBeanFactory(BeanFactory beanFactory) throws BeansException
setBeanFactory
in interface BeanFactoryAware
BeansException
protected MessageBuilderFactory getMessageBuilderFactory()
public Message<?> doInParser(JsonInboundMessageMapper messageMapperToUse, String jsonMessage, @Nullable Map<String,Object> headers)
doInParser
in interface JsonInboundMessageMapper.JsonMessageParser<P>