public interface MessageCodec<T>
Both operations throw 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.
|
@Nullable ByteBuffer encodeMessage(@Nullable T message)
message - the T message, possibly null.@Nullable T decodeMessage(@Nullable ByteBuffer message)
message - the ByteBuffer message, possibly null.