Class WebSocketTransportCodecs

java.lang.Object
io.fluxzero.common.websocket.WebSocketTransportCodecs

public final class WebSocketTransportCodecs extends Object
Factory and built-in implementations for Fluxzero websocket transport codecs.
  • Method Details

    • forFormat

      public static WebSocketTransportCodec forFormat(WebSocketTransportFormat format, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
      Creates a codec for the supplied format.
    • json

      public static WebSocketTransportCodec json(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
      Existing JSON websocket codec. Jackson represents byte[] fields as base64 strings here.
    • cbor

      public static WebSocketTransportCodec cbor(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
      Jackson CBOR codec. This keeps the JSON object model but writes byte[] fields as native binary.