Class JsonbTextDecoder

java.lang.Object
org.apache.johnzon.websocket.internal.TypeAwareDecoder
org.apache.johnzon.websocket.jsonb.JsonbTextDecoder
All Implemented Interfaces:
jakarta.websocket.Decoder, jakarta.websocket.Decoder.TextStream<Object>

public class JsonbTextDecoder extends TypeAwareDecoder implements jakarta.websocket.Decoder.TextStream<Object>
  • Field Details

    • mapper

      protected jakarta.json.bind.Jsonb mapper
    • type

      protected Type type
  • Constructor Details

    • JsonbTextDecoder

      public JsonbTextDecoder()
    • JsonbTextDecoder

      public JsonbTextDecoder(Type type)
    • JsonbTextDecoder

      public JsonbTextDecoder(jakarta.json.bind.Jsonb jsonb, Type type)
  • Method Details

    • decode

      public Object decode(Reader stream) throws jakarta.websocket.DecodeException
      Specified by:
      decode in interface jakarta.websocket.Decoder.TextStream<Object>
      Throws:
      jakarta.websocket.DecodeException
    • init

      public void init(jakarta.websocket.EndpointConfig endpointConfig)
      Specified by:
      init in interface jakarta.websocket.Decoder
      Overrides:
      init in class TypeAwareDecoder
    • destroy

      public void destroy()
      Specified by:
      destroy in interface jakarta.websocket.Decoder