Class JsonbTextEncoder

java.lang.Object
org.apache.johnzon.websocket.jsonb.JsonbTextEncoder
All Implemented Interfaces:
jakarta.websocket.Encoder, jakarta.websocket.Encoder.TextStream<Object>

public class JsonbTextEncoder extends Object implements jakarta.websocket.Encoder.TextStream<Object>
  • Nested Class Summary

    Nested classes/interfaces inherited from interface jakarta.websocket.Encoder

    jakarta.websocket.Encoder.Binary<T extends Object>, jakarta.websocket.Encoder.BinaryStream<T extends Object>, jakarta.websocket.Encoder.Text<T extends Object>, jakarta.websocket.Encoder.TextStream<T extends Object>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private jakarta.json.bind.Jsonb
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    encode(Object object, Writer writer)
     
    void
    init(jakarta.websocket.EndpointConfig endpointConfig)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • jsonb

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

    • JsonbTextEncoder

      public JsonbTextEncoder()
  • Method Details

    • 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