Package org.eclipse.jetty.client.api
Interface Response.ContentListener
- All Superinterfaces:
EventListener,Response.AsyncContentListener,Response.DemandedContentListener,Response.ResponseListener
- All Known Subinterfaces:
Response.Listener
- All Known Implementing Classes:
AsyncMiddleManServlet.ProxyResponseListener,BufferingResponseListener,ContinueProtocolHandler.ContinueListener,FutureResponseListener,InputStreamResponseListener,ProxyServlet.ProxyResponseListener,RedirectProtocolHandler,Response.Listener.Adapter
- Enclosing interface:
- Response
Synchronous listener for the response content events.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidonContent(Response response, ByteBuffer content) Callback method invoked when the response content has been received, parsed and there is demand.default voidonContent(Response response, ByteBuffer content, Callback callback) Callback method invoked when the response content has been received, parsed and there is demand.Methods inherited from interface org.eclipse.jetty.client.api.Response.AsyncContentListener
onContentMethods inherited from interface org.eclipse.jetty.client.api.Response.DemandedContentListener
onBeforeContent
-
Method Details
-
onContent
Callback method invoked when the response content has been received, parsed and there is demand. This method may be invoked multiple times, and thecontentbuffer must be consumed (or copied) before returning from this method.- Parameters:
response- the response containing the response line data and the headerscontent- the content bytes received
-
onContent
Description copied from interface:Response.AsyncContentListenerCallback method invoked when the response content has been received, parsed and there is demand. Thecallbackobject should be succeeded to signal that thecontentbuffer has been consumed and to demand more content.- Specified by:
onContentin interfaceResponse.AsyncContentListener- Parameters:
response- the response containing the response line data and the headerscontent- the content bytes receivedcallback- the callback to call when the content is consumed and to demand more content
-