Class AsyncJSONTransport.AbstractReader

java.lang.Object
org.cometd.server.http.AsyncJSONTransport.AbstractReader
All Implemented Interfaces:
jakarta.servlet.ReadListener, java.util.EventListener
Direct Known Subclasses:
AsyncJSONTransport.CharsetReader, AsyncJSONTransport.UTF8Reader
Enclosing class:
AsyncJSONTransport

protected abstract class AsyncJSONTransport.AbstractReader
extends java.lang.Object
implements jakarta.servlet.ReadListener
  • Constructor Summary

    Constructors
    Modifier Constructor Description
    protected AbstractReader​(AbstractHttpTransport.Context context, Promise<java.lang.Void> promise)  
  • Method Summary

    Modifier and Type Method Description
    protected abstract void append​(byte[] buffer, int offset, int length)  
    protected void finish​(java.lang.String json)  
    protected void finish​(java.util.List<ServerMessage.Mutable> messages)  
    void onDataAvailable()  
    void onError​(java.lang.Throwable failure)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface jakarta.servlet.ReadListener

    onAllDataRead
  • Constructor Details

  • Method Details

    • onDataAvailable

      public void onDataAvailable() throws java.io.IOException
      Specified by:
      onDataAvailable in interface jakarta.servlet.ReadListener
      Throws:
      java.io.IOException
    • append

      protected abstract void append​(byte[] buffer, int offset, int length)
    • finish

      protected void finish​(java.util.List<ServerMessage.Mutable> messages) throws java.io.IOException
      Throws:
      java.io.IOException
    • finish

      protected void finish​(java.lang.String json) throws java.io.IOException
      Throws:
      java.io.IOException
    • onError

      public void onError​(java.lang.Throwable failure)
      Specified by:
      onError in interface jakarta.servlet.ReadListener