Interface ChannelFunction

    • Method Detail

      • afterRead

        void afterRead​(ByteBuffer buf,
                       int position,
                       int length)
                throws IOException
        Is called on the ByteBuffer after a read operation completes
        Parameters:
        buf - the ByteBuffer to operate on
        position - the index in the ByteBuffer to start from
        length - the number of bytes to operate on
        Throws:
        IOException - thrown if an error occurs
      • beforeWrite

        void beforeWrite​(ByteBuffer buf,
                         int position,
                         int length)
                  throws IOException
        Is called on the ByteBuffer before a write operation completes
        Parameters:
        buf - the ByteBuffer to operate on
        position - the index in the ByteBuffer to start from
        length - the number of bytes to operate on
        Throws:
        IOException - thrown if an error occurs
      • complete

        void complete()
               throws IOException
        Is called to complete the ChannelFunction. Access it after complete is called may result in unexpected behavior.
        Throws:
        IOException - thrown if an error occurs