Interface InboundMessageMapper<T>
- Type Parameters:
T
- the type of object to create message from.
- All Known Subinterfaces:
BytesMessageMapper
,MethodArgsMessageMapper
- All Known Implementing Classes:
AbstractJsonInboundMessageMapper
,ConvertingBytesMessageMapper
,DatagramPacketMessageMapper
,EmbeddedJsonHeadersMessageMapper
,JsonInboundMessageMapper
,MessageConvertingTcpMessageMapper
,TcpMessageMapper
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface InboundMessageMapper<T>
Strategy interface for mapping from an Object to a
Message
.- Author:
- Mark Fisher, Artem Bilan, Gary Russell
-
Method Details
-
toMessage
Convert a provided object to theMessage
.- Parameters:
object
- the object for message payload or some other conversion logic- Returns:
- the message as a result of mapping
-
toMessage
Convert a provided object to theMessage
and supply with headers if necessary and provided.- Parameters:
object
- the object for message payload or some other conversion logicheaders
- additional headers for building message. Can be null- Returns:
- the message as a result of mapping
- Since:
- 5.0
-