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() |
Modifier and Type | Method and Description |
---|---|
protected com.fasterxml.jackson.core.JsonParser |
createJsonParser(String jsonMessage) |
Message<?> |
doInParser(JsonInboundMessageMapper messageMapper,
String jsonMessage) |
protected MessageBuilderFactory |
getMessageBuilderFactory() |
protected Message<?> |
parseWithHeaders(com.fasterxml.jackson.core.JsonParser parser,
String jsonMessage) |
protected Object |
readHeader(P parser,
String headerName,
String jsonMessage) |
protected Object |
readPayload(P parser,
String jsonMessage) |
void |
setBeanFactory(BeanFactory beanFactory) |
protected com.fasterxml.jackson.core.JsonParser createJsonParser(String jsonMessage) throws Exception
Exception
protected Message<?> parseWithHeaders(com.fasterxml.jackson.core.JsonParser parser, String jsonMessage) throws Exception
Exception
public void setBeanFactory(BeanFactory beanFactory) throws BeansException
setBeanFactory
in interface BeanFactoryAware
BeansException
protected MessageBuilderFactory getMessageBuilderFactory()
public Message<?> doInParser(JsonInboundMessageMapper messageMapper, String jsonMessage) throws Exception
doInParser
in interface JsonInboundMessageMapper.JsonMessageParser<P>
Exception
protected Object readPayload(P parser, String jsonMessage) throws Exception
Exception