Interface BytesMessageMapper

All Superinterfaces:
InboundMessageMapper<byte[]>, OutboundMessageMapper<byte[]>
All Known Implementing Classes:
ConvertingBytesMessageMapper, 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 Details

    • toMessage

      @NonNull 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

      @NonNull 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