Class JsonbTextEncoder

  • All Implemented Interfaces:
    jakarta.websocket.Encoder, jakarta.websocket.Encoder.TextStream<Object>

    public class JsonbTextEncoder
    extends Object
    implements jakarta.websocket.Encoder.TextStream<Object>
    • Field Detail

      • jsonb

        private jakarta.json.bind.Jsonb jsonb
    • Constructor Detail

      • JsonbTextEncoder

        public JsonbTextEncoder()
    • Method Detail

      • init

        public void init​(jakarta.websocket.EndpointConfig endpointConfig)
        Specified by:
        init in interface jakarta.websocket.Encoder
      • destroy

        public void destroy()
        Specified by:
        destroy in interface jakarta.websocket.Encoder
      • encode

        public void encode​(Object object,
                           Writer writer)
                    throws jakarta.websocket.EncodeException
        Specified by:
        encode in interface jakarta.websocket.Encoder.TextStream<Object>
        Throws:
        jakarta.websocket.EncodeException