Interface CommunicationMessageCodec
- All Known Implementing Classes:
DefaultCommunicationMessageCodec
public interface CommunicationMessageCodec
Strategy for creating and serializing external communication messages.
- Author:
- 渔民小镇
- date:
- 2023-12-15
-
Method Summary
Modifier and TypeMethodDescriptionCreate a new mutable message instance for outgoing writes.default CommunicationMessagedecode(byte[] bytes) Decode a serialized external message.default byte[]encode(CommunicationMessage message) Encode a communication message with the currently configured data codec.
-
Method Details
-
createCommunicationMessage
CommunicationMessage createCommunicationMessage()Create a new mutable message instance for outgoing writes.- Returns:
- communication message implementation
-
encode
Encode a communication message with the currently configured data codec.- Parameters:
message- message to encode- Returns:
- serialized bytes
-
decode
Decode a serialized external message.- Parameters:
bytes- serialized bytes- Returns:
- decoded communication message
-