Spring Integration

org.springframework.integration.json
Class AbstractJsonInboundMessageMapper<P>

java.lang.Object
  extended by org.springframework.integration.json.AbstractJsonInboundMessageMapper<P>
All Implemented Interfaces:
InboundMessageMapper<java.lang.String>
Direct Known Subclasses:
JsonInboundMessageMapper

public abstract class AbstractJsonInboundMessageMapper<P>
extends java.lang.Object
implements InboundMessageMapper<java.lang.String>

Abstract InboundMessageMapper implementation that maps incoming JSON messages to a Message with the specified payload type.

Since:
3.0
Author:
Artem Bilan
See Also:
JsonInboundMessageMapper

Field Summary
protected static java.util.Map<java.lang.String,java.lang.Class<?>> DEFAULT_HEADER_TYPES
           
protected  java.util.Map<java.lang.String,java.lang.Class<?>> headerTypes
           
protected  boolean mapToPayload
           
protected static java.lang.String MESSAGE_FORMAT_ERROR
           
protected  java.lang.reflect.Type payloadType
           
 
Constructor Summary
AbstractJsonInboundMessageMapper(java.lang.reflect.Type payloadType)
           
 
Method Summary
protected abstract  java.util.Map<java.lang.String,java.lang.Object> readHeaders(P parser, java.lang.String jsonMessage)
           
protected abstract  java.lang.Object readPayload(P parser, java.lang.String jsonMessage)
           
 void setHeaderTypes(java.util.Map<java.lang.String,java.lang.Class<?>> headerTypes)
           
 void setMapToPayload(boolean mapToPayload)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.integration.mapping.InboundMessageMapper
toMessage
 

Field Detail

MESSAGE_FORMAT_ERROR

protected static final java.lang.String MESSAGE_FORMAT_ERROR
See Also:
Constant Field Values

DEFAULT_HEADER_TYPES

protected static final java.util.Map<java.lang.String,java.lang.Class<?>> DEFAULT_HEADER_TYPES

payloadType

protected final java.lang.reflect.Type payloadType

headerTypes

protected final java.util.Map<java.lang.String,java.lang.Class<?>> headerTypes

mapToPayload

protected volatile boolean mapToPayload
Constructor Detail

AbstractJsonInboundMessageMapper

public AbstractJsonInboundMessageMapper(java.lang.reflect.Type payloadType)
Method Detail

setHeaderTypes

public void setHeaderTypes(java.util.Map<java.lang.String,java.lang.Class<?>> headerTypes)

setMapToPayload

public void setMapToPayload(boolean mapToPayload)

readPayload

protected abstract java.lang.Object readPayload(P parser,
                                                java.lang.String jsonMessage)
                                         throws java.lang.Exception
Throws:
java.lang.Exception

readHeaders

protected abstract java.util.Map<java.lang.String,java.lang.Object> readHeaders(P parser,
                                                                                java.lang.String jsonMessage)
                                                                         throws java.lang.Exception
Throws:
java.lang.Exception

Spring Integration