Class ReadListenerImpl

  • All Implemented Interfaces:
    java.util.EventListener, javax.servlet.ReadListener

    public class ReadListenerImpl
    extends java.lang.Object
    implements javax.servlet.ReadListener
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static org.slf4j.Logger LOGGER  
    • Constructor Summary

      Constructors 
      Constructor Description
      ReadListenerImpl​(ServletGateway sg, javax.servlet.ServletInputStream in, javax.servlet.AsyncContext ac, java.lang.Integer readChunkSize)  
    • Method Summary

      Modifier and Type Method Description
      java.util.Queue byteArrayToQueue​(byte[] source, int chunksize)  
      void onAllDataRead()  
      void onDataAvailable()  
      void onError​(java.lang.Throwable t)  
      byte[] queueToByteArray​(java.util.Queue<byte[]> queue)  
      • Methods inherited from class java.lang.Object

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

      • LOGGER

        protected static org.slf4j.Logger LOGGER
    • Constructor Detail

      • ReadListenerImpl

        public ReadListenerImpl​(ServletGateway sg,
                                javax.servlet.ServletInputStream in,
                                javax.servlet.AsyncContext ac,
                                java.lang.Integer readChunkSize)
    • Method Detail

      • onDataAvailable

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

        public void onAllDataRead()
                           throws java.io.IOException
        Specified by:
        onAllDataRead in interface javax.servlet.ReadListener
        Throws:
        java.io.IOException
      • queueToByteArray

        public byte[] queueToByteArray​(java.util.Queue<byte[]> queue)
      • onError

        public void onError​(java.lang.Throwable t)
        Specified by:
        onError in interface javax.servlet.ReadListener
      • byteArrayToQueue

        public java.util.Queue byteArrayToQueue​(byte[] source,
                                                int chunksize)