Interface ChunkObserver

  • All Implemented Interfaces:

    
    public interface ChunkObserver
    
                        

    An observer to inspect individual byte chunks as they are being received from the HTTP response body.

    • The onChunk method can be called multiple times for the same response.

    • The onEnd method is called at most once after the last chunk has been received.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Unit onChunk(ByteArray chunk) Called when a byte chunk is received from the HTTP response body.
      Unit onEnd() Called after the last chunk of the HTTP response body has been received.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • onChunk

         abstract Unit onChunk(ByteArray chunk)

        Called when a byte chunk is received from the HTTP response body.

        Parameters:
        chunk - The received byte chunk.
      • onEnd

         Unit onEnd()

        Called after the last chunk of the HTTP response body has been received.