Class JsrEncoder<T>

  • All Implemented Interfaces:
    javax.websocket.Encoder, javax.websocket.Encoder.TextStream<T>
    Direct Known Subclasses:
    JsrArrayEncoder, JsrObjectEncoder, JsrStructureEncoder

    public abstract class JsrEncoder<T>
    extends java.lang.Object
    implements javax.websocket.Encoder.TextStream<T>
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface javax.websocket.Encoder

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

      Fields 
      Modifier and Type Field Description
      private javax.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​(javax.json.JsonWriter writer, T t)  
      void encode​(T t, java.io.Writer writer)  
      void init​(javax.websocket.EndpointConfig endpointConfig)  
      • Methods inherited from class java.lang.Object

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

      • factory

        private javax.json.JsonWriterFactory factory
    • Constructor Detail

      • JsrEncoder

        public JsrEncoder()
    • Method Detail

      • doWrite

        protected abstract void doWrite​(javax.json.JsonWriter writer,
                                        T t)
      • init

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

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

        public void encode​(T t,
                           java.io.Writer writer)
                    throws javax.websocket.EncodeException,
                           java.io.IOException
        Specified by:
        encode in interface javax.websocket.Encoder.TextStream<T>
        Throws:
        javax.websocket.EncodeException
        java.io.IOException