Interface Response.ContentListener

    • Method Detail

      • onContent

        void onContent​(Response response,
                       java.nio.ByteBuffer content)
        Callback method invoked when the response content has been received, parsed and there is demand. This method may be invoked multiple times, and the content buffer must be consumed (or copied) before returning from this method.
        Parameters:
        response - the response containing the response line data and the headers
        content - the content bytes received
      • onContent

        default void onContent​(Response response,
                               java.nio.ByteBuffer content,
                               Callback callback)
        Description copied from interface: Response.AsyncContentListener
        Callback method invoked when the response content has been received, parsed and there is demand. The callback object should be succeeded to signal that the content buffer has been consumed and to demand more content.
        Specified by:
        onContent in interface Response.AsyncContentListener
        Parameters:
        response - the response containing the response line data and the headers
        content - the content bytes received
        callback - the callback to call when the content is consumed and to demand more content