Class CommunicationMessageKit
java.lang.Object
com.iohao.net.external.core.message.CommunicationMessageKit
Static facade for the configured
CommunicationMessageCodec.- Author:
- 渔民小镇
- date:
- 2023-12-15
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic CommunicationMessageCodecActive codec used by external transports. -
Method Summary
Modifier and TypeMethodDescriptionstatic CommunicationMessageCreate a new communication message via the active codec.static CommunicationMessagedecode(byte[] bytes) Decode an external message from bytes.static byte[]encode(CommunicationMessage message) Encode a communication message to bytes.
-
Field Details
-
communicationMessageCodec
Active codec used by external transports.
-
-
Method Details
-
createCommunicationMessage
Create a new communication message via the active codec.- Returns:
- message instance
-
encode
Encode a communication message to bytes.- Parameters:
message- message to encode- Returns:
- serialized bytes
-
decode
Decode an external message from bytes.- Parameters:
bytes- serialized bytes- Returns:
- decoded communication message
-