Interface Response.AsyncContentListener

All Superinterfaces:
EventListener, Response.ContentSourceListener, Response.ResponseListener
All Known Subinterfaces:
Response.ContentListener, 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.AsyncContentListener extends Response.ContentSourceListener
Asynchronous listener for the response content events.
See Also:
  • Method Details

    • onContent

      void onContent(Response response, Content.Chunk chunk, Runnable demander)
    • onContentSource

      default void onContentSource(Response response, Content.Source contentSource)
      Description copied from interface: Response.ContentSourceListener
      Callback method invoked when all the response headers have been received and parsed. It is responsible for driving the contentSource instance with a read/demand loop. Note that this is not invoked for interim statuses.
      Specified by:
      onContentSource in interface Response.ContentSourceListener
      Parameters:
      response - the response containing the response line data and the headers
      contentSource - the Content.Source that must be driven to read the data