Interface Response.ContentListener

All Superinterfaces:
EventListener, Response.AsyncContentListener, Response.ContentSourceListener, Response.ResponseListener
All Known Subinterfaces:
Response.Listener
All Known Implementing Classes:
AsyncMiddleManServlet.ProxyResponseListener, BufferingResponseListener, CompletableResponseListener, ContinueProtocolHandler.ContinueListener, FutureResponseListener, InputStreamResponseListener, ProxyHandler.ProxyResponseListener, ProxyServlet.ProxyResponseListener, RedirectProtocolHandler
Enclosing interface:
Response

public static interface Response.ContentListener extends Response.AsyncContentListener
Synchronous listener for the response content events.
See Also:
  • Method Details

    • onContent

      void onContent(Response response, 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, Content.Chunk chunk, Runnable demander)
      Specified by:
      onContent in interface Response.AsyncContentListener