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
  • Method Summary

    Modifier and Type Method Description
    default org.springframework.messaging.Message<?> toMessage​(byte[] object)
    Convert a provided object to the Message.
    org.springframework.messaging.Message<?> toMessage​(byte[] bytes, java.util.Map<java.lang.String,​java.lang.Object> headers)
    Convert a provided object to the Message and supply with headers if necessary and provided.

    Methods inherited from interface org.springframework.integration.mapping.OutboundMessageMapper

    fromMessage
  • Method Details

    • toMessage

      @NonNull default org.springframework.messaging.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 org.springframework.messaging.Message<?> toMessage​(byte[] bytes, @Nullable java.util.Map<java.lang.String,​java.lang.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