Interface WebSocketSafeTypeEncoder<R,T>
- Type Parameters:
R- The result type after encoding.T- The input type to be encoded.
- All Known Subinterfaces:
WebSocketSafeTypeEncoder.TypeToByteArrayEncoder<T>,WebSocketSafeTypeEncoder.TypeToByteBufferEncoder<T>,WebSocketSafeTypeEncoder.TypeToJsonEncoder<T>,WebSocketSafeTypeEncoder.TypeToStringEncoder<T>
@Experimental
public sealed interface WebSocketSafeTypeEncoder<R,T>
extends Encoder<R,T>
permits WebSocketSafeTypeEncoder.TypeToByteArrayEncoder<T>, WebSocketSafeTypeEncoder.TypeToByteBufferEncoder<T>, WebSocketSafeTypeEncoder.TypeToJsonEncoder<T>, WebSocketSafeTypeEncoder.TypeToStringEncoder<T>
A sealed
Encoder for safely encoding types for WebSocket communication.
Implementations of this interface convert application-level objects into various
WebSocket compatible formats such as byte arrays, strings,
byte buffers, or frame.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAn encoder that transforms a specific input type into abyte[]representation suitable for binary WebSocket frames.static interfaceAn encoder that transforms a specific input type into aByteBufferrepresentation.static interfaceAn encoder that transforms a specific input type into aJsonrepresentation, typically for use with text-based WebSocket frames.static interfaceAn encoder that transforms a specific input type into aStringrepresentation, typically for use with text-based WebSocket frames. -
Method Summary