Interface CommunicationMessageCodec

All Known Implementing Classes:
DefaultCommunicationMessageCodec

public interface CommunicationMessageCodec
Strategy for creating and serializing external communication messages.
Author:
渔民小镇
date:
2023-12-15
  • Method Details

    • createCommunicationMessage

      CommunicationMessage createCommunicationMessage()
      Create a new mutable message instance for outgoing writes.
      Returns:
      communication message implementation
    • encode

      default byte[] encode(CommunicationMessage message)
      Encode a communication message with the currently configured data codec.
      Parameters:
      message - message to encode
      Returns:
      serialized bytes
    • decode

      default CommunicationMessage decode(byte[] bytes)
      Decode a serialized external message.
      Parameters:
      bytes - serialized bytes
      Returns:
      decoded communication message