Interface BytesMessageMapper

All Superinterfaces:
InboundMessageMapper<byte[]>, OutboundMessageMapper<byte[]>
All Known Implementing Classes:
ConvertingBytesMessageMapper, EmbeddedHeadersJsonMessageMapper, EmbeddedJsonHeadersMessageMapper

public interface BytesMessageMapper extends InboundMessageMapper<byte[]>, OutboundMessageMapper<byte[]>
An OutboundMessageMapper and InboundMessageMapper that maps to/from byte[].
Since:
5.0
Author:
Gary Russell
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    fromMessage(Message<?> message)
     
    default Message<?>
    toMessage(byte[] object)
    Convert a provided object to the Message.
    toMessage(byte[] bytes, @Nullable Map<String,Object> headers)
    Convert a provided object to the Message and supply with headers if necessary and provided.
  • Method Details

    • toMessage

      default Message<?> toMessage(byte[] object)
      Description copied from interface: InboundMessageMapper
      Convert a provided object to the Message.
      Specified by:
      toMessage in interface InboundMessageMapper<byte[]>
      Parameters:
      object - the object for message payload or some other conversion logic
      Returns:
      the message as a result of mapping
    • toMessage

      Message<?> toMessage(byte[] bytes, @Nullable Map<String,Object> headers)
      Description copied from interface: InboundMessageMapper
      Convert a provided object to the Message and supply with headers if necessary and provided.
      Specified by:
      toMessage in interface InboundMessageMapper<byte[]>
      Parameters:
      bytes - 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
    • fromMessage

      byte[] fromMessage(Message<?> message)
      Specified by:
      fromMessage in interface OutboundMessageMapper<byte[]>