Class BufferingResponseListener

java.lang.Object
org.eclipse.jetty.client.api.Response.Listener.Adapter
org.eclipse.jetty.client.util.BufferingResponseListener
All Implemented Interfaces:
EventListener, Response.AsyncContentListener, Response.BeginListener, Response.CompleteListener, Response.ContentListener, Response.DemandedContentListener, Response.FailureListener, Response.HeaderListener, Response.HeadersListener, Response.Listener, Response.ResponseListener, Response.SuccessListener
Direct Known Subclasses:
ContinueProtocolHandler.ContinueListener, FutureResponseListener

public abstract class BufferingResponseListener extends Response.Listener.Adapter

Implementation of Response.Listener that buffers the content up to a maximum length specified to the constructors.

The content may be retrieved from Response.Listener.onSuccess(Response) or onComplete(Result) via getContent() or getContentAsString().

Instances of this class are not reusable, so one must be allocated for each request.