Class ChannelAsyncOutputStream

    • Field Detail

      • channelInstance

        private final Channel channelInstance
      • cmd

        private final byte cmd
      • pendingWrite

        private final java.util.concurrent.atomic.AtomicReference<IoWriteFutureImpl> pendingWrite
      • packetWriteId

        private final java.lang.Object packetWriteId
    • Constructor Detail

      • ChannelAsyncOutputStream

        public ChannelAsyncOutputStream​(Channel channel,
                                        byte cmd)
    • Method Detail

      • onWindowExpanded

        public void onWindowExpanded()
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • writeBuffer

        public IoWriteFuture writeBuffer​(Buffer buffer)
                                  throws java.io.IOException
        Description copied from interface: IoOutputStream
        Write the given buffer.
        Specified by:
        writeBuffer in interface IoOutputStream
        Parameters:
        buffer - the data to write. NOTE: the buffer must not be touched until the returned write future is completed.
        Returns:
        An IoWriteFuture that can be used to check when the data has actually been written.
        Throws:
        java.io.IOException - if an error occurred when writing the data
      • preClose

        protected void preClose()
        Description copied from class: AbstractCloseable
        preClose is guaranteed to be called before doCloseGracefully or doCloseImmediately. When preClose() is called, isClosing() == true
        Overrides:
        preClose in class AbstractCloseable
      • doWriteIfPossible

        protected void doWriteIfPossible​(boolean resume)
      • createSendBuffer

        protected Buffer createSendBuffer​(Buffer buffer,
                                          Channel channel,
                                          long length)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object