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.JsonWriterFactoryfactory
-
Constructor Summary
Constructors Constructor Description JsrEncoder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddestroy()protected abstract voiddoWrite(jakarta.json.JsonWriter writer, T t)voidencode(T t, Writer writer)voidinit(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:
initin interfacejakarta.websocket.Encoder
-
destroy
public void destroy()
- Specified by:
destroyin interfacejakarta.websocket.Encoder
-
encode
public void encode(T t, Writer writer) throws jakarta.websocket.EncodeException, IOException
- Specified by:
encodein interfacejakarta.websocket.Encoder.TextStream<T>- Throws:
jakarta.websocket.EncodeExceptionIOException
-
-