Class AsyncServletOutputStreamWriter.WriteState

    • Field Detail

      • readyAndDrained

        final boolean readyAndDrained
        The servlet output stream is ready and the writeChain is empty.

        readyAndDrained turns from false to true when: onWritePossible() exits while currently there is no more data to write, but the last check of ServletOutputStream.isReady() is true.

        readyAndDrained turns from true to false when: runOrBuffer() exits while either the action item is written directly to the servlet output stream and the check of ServletOutputStream.isReady() right after that returns false, or the action item is buffered into the writeChain.

    • Constructor Detail

      • WriteState

        WriteState​(boolean readyAndDrained)
    • Method Detail

      • withReadyAndDrained

        @CheckReturnValue
        AsyncServletOutputStreamWriter.WriteState withReadyAndDrained​(boolean readyAndDrained)
        Only onWritePossible() can set readyAndDrained to true, and only runOrBuffer() can set it to false.