Interface TcpMessageCodec<P>
- Type Parameters:
P
- the message payload type
- All Known Implementing Classes:
StompTcpMessageCodec
public interface TcpMessageCodec<P>
Contract to encode and decode a
Message
to and from a ByteBuffer
allowing a higher-level protocol (for example, STOMP over TCP) to plug in.- Since:
- 6.0
- Author:
- Rossen Stoyanchev
-
Method Summary
Modifier and TypeMethodDescriptiondecode
(ByteBuffer buffer) Decode the inputByteBuffer
into one or moreMessages
.Encode the givenMessage
to the outputByteBuffer
.
-
Method Details
-
decode
Decode the inputByteBuffer
into one or moreMessages
.- Parameters:
buffer
- the input buffer to decode from- Returns:
- 0 or more decoded messages
-
encode
Encode the givenMessage
to the outputByteBuffer
.- Parameters:
message
- the message to encode- Returns:
- the encoded buffer
-