Interface BodyProcessor

All Known Implementing Classes:
ChunkedBodyProcessor, ContentLengthBodyProcessor

public interface BodyProcessor
A body parser that handles request body processing based on either Content-Length or chunked data.
Author:
Brian Pontarelli
  • Method Details

    • currentBuffer

      ByteBuffer currentBuffer()
      Returns:
      The current buffer that the selector should use for reading.
    • isComplete

      boolean isComplete()
      Returns:
      True if the body processing is complete.
    • processBuffer

      void processBuffer(Consumer<ByteBuffer> consumer)
      Called after bytes are read into the current buffer in order to process the bytes read.
      Parameters:
      consumer - A consumer of finished ByteBuffers.
    • totalBytesProcessed

      long totalBytesProcessed()