public interface MessageCodec<T>
IllegalArgumentException
, if conversion fails.Modifier and Type | Method and Description |
---|---|
T |
decodeMessage(ByteBuffer message)
Decodes the specified message from binary.
|
ByteBuffer |
encodeMessage(T message)
Encodes the specified message into binary.
|
ByteBuffer encodeMessage(T message)
message
- the T message, possibly null.T decodeMessage(ByteBuffer message)
message
- the ByteBuffer
message, possibly null.