Package io.quarkus.websockets.next
Interface MessageCodec<T,MESSAGE>
- Type Parameters:
T-MESSAGE-
- All Known Subinterfaces:
BinaryMessageCodec<T>,TextMessageCodec<T>
- All Known Implementing Classes:
JsonTextMessageCodec
public interface MessageCodec<T,MESSAGE>
Used to encode and decode messages.
- See Also:
-
Method Summary
-
Method Details
-
supports
- Parameters:
type- the type to handle, must not benull- Returns:
trueif this codec can encode/decode the provided type,falseotherwise
-
encode
- Parameters:
value- the value to encode, must not benull- Returns:
- the encoded representation of the value
-
decode
- Parameters:
type- the type of the object to decode, must not benullvalue- the value to decode, must not benull- Returns:
- the decoded representation of the value
-