Class JsonInboundMessageMapper
java.lang.Object
org.springframework.integration.support.json.AbstractJsonInboundMessageMapper<JsonInboundMessageMapper.JsonMessageParser<?>>
org.springframework.integration.support.json.JsonInboundMessageMapper
- All Implemented Interfaces:
- InboundMessageMapper<String>
public class JsonInboundMessageMapper
extends AbstractJsonInboundMessageMapper<JsonInboundMessageMapper.JsonMessageParser<?>>
InboundMessageMapper implementation that maps incoming JSON messages
 to a Message with the specified payload type.
 
 Consider using the EmbeddedJsonHeadersMessageMapper instead.
- Since:
- 2.0
- Author:
- Jeremy Grelle, Oleg Zhurakousky, Mark Fisher, Artem Bilan, Gary Russell
- 
Nested Class SummaryNested Classes
- 
Field SummaryFields inherited from class org.springframework.integration.support.json.AbstractJsonInboundMessageMapperDEFAULT_HEADER_TYPES, headerTypes, MESSAGE_FORMAT_ERROR, payloadType
- 
Constructor SummaryConstructorsConstructorDescriptionJsonInboundMessageMapper(Class<?> payloadType, JsonInboundMessageMapper.JsonMessageParser<?> messageParser) JsonInboundMessageMapper(Type payloadType, JsonInboundMessageMapper.JsonMessageParser<?> messageParser) 
- 
Method SummaryModifier and TypeMethodDescriptionreadHeaders(JsonInboundMessageMapper.JsonMessageParser<?> parser, String jsonMessage) protected ObjectreadPayload(JsonInboundMessageMapper.JsonMessageParser<?> parser, String jsonMessage) Message<?>Convert a provided object to theMessageand supply with headers if necessary and provided.Methods inherited from class org.springframework.integration.support.json.AbstractJsonInboundMessageMapperisMapToPayload, setHeaderTypes, setMapToPayloadMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.integration.mapping.InboundMessageMappertoMessage
- 
Constructor Details- 
JsonInboundMessageMapperpublic JsonInboundMessageMapper(Class<?> payloadType, JsonInboundMessageMapper.JsonMessageParser<?> messageParser) 
- 
JsonInboundMessageMapperpublic JsonInboundMessageMapper(Type payloadType, JsonInboundMessageMapper.JsonMessageParser<?> messageParser) 
 
- 
- 
Method Details- 
getPayloadType
- 
getHeaderTypes
- 
toMessageDescription copied from interface:InboundMessageMapperConvert a provided object to theMessageand supply with headers if necessary and provided.- Parameters:
- jsonMessage- the object for message payload or some other conversion logic
- headers- additional headers for building message. Can be null
- Returns:
- the message as a result of mapping
 
- 
readHeadersprotected Map<String,Object> readHeaders(JsonInboundMessageMapper.JsonMessageParser<?> parser, String jsonMessage) - Specified by:
- readHeadersin class- AbstractJsonInboundMessageMapper<JsonInboundMessageMapper.JsonMessageParser<?>>
 
- 
readPayloadprotected Object readPayload(JsonInboundMessageMapper.JsonMessageParser<?> parser, String jsonMessage) - Specified by:
- readPayloadin class- AbstractJsonInboundMessageMapper<JsonInboundMessageMapper.JsonMessageParser<?>>
 
 
-