Class JsrEncoder<T>
- java.lang.Object
-
- org.apache.johnzon.websocket.internal.jsr.JsrEncoder<T>
-
- All Implemented Interfaces:
jakarta.websocket.Encoder
,jakarta.websocket.Encoder.TextStream<T>
- Direct Known Subclasses:
JsrArrayEncoder
,JsrObjectEncoder
,JsrStructureEncoder
public abstract class JsrEncoder<T> extends Object implements jakarta.websocket.Encoder.TextStream<T>
-
-
Field Summary
Fields Modifier and Type Field Description private jakarta.json.JsonWriterFactory
factory
-
Constructor Summary
Constructors Constructor Description JsrEncoder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
destroy()
protected abstract void
doWrite(jakarta.json.JsonWriter writer, T t)
void
encode(T t, Writer writer)
void
init(jakarta.websocket.EndpointConfig endpointConfig)
-
-
-
Method Detail
-
doWrite
protected abstract void doWrite(jakarta.json.JsonWriter writer, T t)
-
init
public void init(jakarta.websocket.EndpointConfig endpointConfig)
- Specified by:
init
in interfacejakarta.websocket.Encoder
-
destroy
public void destroy()
- Specified by:
destroy
in interfacejakarta.websocket.Encoder
-
encode
public void encode(T t, Writer writer) throws jakarta.websocket.EncodeException, IOException
- Specified by:
encode
in interfacejakarta.websocket.Encoder.TextStream<T>
- Throws:
jakarta.websocket.EncodeException
IOException
-
-