Interface WebSocketPayloadCodec
- All Known Implementing Classes:
ModelWebSocketCodec, TrackingWebSocketCodec
public interface WebSocketPayloadCodec
Optional compact representation for a protocol-specific websocket payload.
Implementations return null for values or transport formats they do not own. The generic transport then
falls back to its regular JSON or CBOR representation.
-
Method Summary
Modifier and TypeMethodDescriptiontryDecode(byte[] bytes, WebSocketTransportFormat format) Returns the decoded value, ornullwhen the bytes do not belong to this codec.byte[]tryEncode(JsonType value, WebSocketTransportFormat format) Returns a compact representation, ornullwhen this codec does not own the value.
-
Method Details
-
tryEncode
Returns a compact representation, ornullwhen this codec does not own the value.- Throws:
IOException
-
tryDecode
Returns the decoded value, ornullwhen the bytes do not belong to this codec.- Throws:
IOException
-