org.springframework.integration.json
Class InboundJsonMessageMapper
java.lang.Object
org.springframework.integration.json.InboundJsonMessageMapper
- All Implemented Interfaces:
- InboundMessageMapper<String>
public class InboundJsonMessageMapper
- extends Object
- implements InboundMessageMapper<String>
InboundMessageMapper
implementation that maps incoming JSON messages to a Message
with the specified payload type.
TODO - Need to figure out if we need to go as deep in mapping HeaderTypes...right now it wouldn't work if the header type was something like List
- cannot assume order as implemented; headers may not always precede the payload
- Since:
- 2.0
- Author:
- Jeremy Grelle
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InboundJsonMessageMapper
public InboundJsonMessageMapper(Class<?> payloadType)
InboundJsonMessageMapper
public InboundJsonMessageMapper(org.codehaus.jackson.type.TypeReference<?> typeReference)
setHeaderTypes
public void setHeaderTypes(Map<String,Class<?>> headerTypes)
setMapToPayload
public void setMapToPayload(boolean mapToPayload)
toMessage
public Message<?> toMessage(String jsonMessage)
throws Exception
- Specified by:
toMessage
in interface InboundMessageMapper<String>
- Throws:
Exception
Copyright © 2010. All Rights Reserved.