Class JsonOutboundMessageMapper
java.lang.Object
org.springframework.integration.support.json.JsonOutboundMessageMapper
- All Implemented Interfaces:
OutboundMessageMapper<String>
public class JsonOutboundMessageMapper extends Object implements OutboundMessageMapper<String>
OutboundMessageMapper
implementation the converts a Message
to a JSON
string representation.
Consider using the EmbeddedJsonHeadersMessageMapper
instead; it provides more
flexibility for determining which headers are included.
- Since:
- 2.0
- Author:
- Jeremy Grelle, Mark Fisher, Artem Bilan, Gary Russell
-
Constructor Summary
Constructors Constructor Description JsonOutboundMessageMapper()
JsonOutboundMessageMapper(JsonObjectMapper<?,?> jsonObjectMapper)
-
Method Summary
Modifier and Type Method Description String
fromMessage(Message<?> message)
void
setShouldExtractPayload(boolean shouldExtractPayload)
-
Constructor Details
-
JsonOutboundMessageMapper
public JsonOutboundMessageMapper() -
JsonOutboundMessageMapper
-
-
Method Details
-
setShouldExtractPayload
public void setShouldExtractPayload(boolean shouldExtractPayload) -
fromMessage
- Specified by:
fromMessage
in interfaceOutboundMessageMapper<String>
-