Class FutureResponseListener

java.lang.Object
org.eclipse.jetty.client.BufferingResponseListener
org.eclipse.jetty.client.FutureResponseListener
All Implemented Interfaces:
Future<ContentResponse>, EventListener, Response.AsyncContentListener, Response.BeginListener, Response.CompleteListener, Response.ContentListener, Response.ContentSourceListener, Response.FailureListener, Response.HeaderListener, Response.HeadersListener, Response.Listener, Response.ResponseListener, Response.SuccessListener

@Deprecated public class FutureResponseListener extends BufferingResponseListener implements Future<ContentResponse>
Deprecated.
A BufferingResponseListener that is also a Future, to allow applications to block (indefinitely or for a timeout) until onComplete(Result) is called, or to abort the request/response conversation.

Typical usage is:

 Request request = httpClient.newRequest(...)...;
 FutureResponseListener listener = new FutureResponseListener(request);
 request.send(listener); // Asynchronous send
 ContentResponse response = listener.get(5, TimeUnit.SECONDS); // Timed block