public interface Response
Response
represents an HTTP response and offers methods to retrieve status code, HTTP version
and headers.
Response
objects are passed as parameters to Response.Listener
callbacks, or as
future result of Request.send()
.
Response
objects do not contain getters for the response content, because it may be too large
to fit into memory.
The response content should be retrieved via content
events
, or via utility classes such as BufferingResponseListener
.
Modifier and Type | Interface and Description |
---|---|
static interface |
Response.AsyncContentListener
Asynchronous listener for the response content events.
|
static interface |
Response.BeginListener
Listener for the response begin event.
|
static interface |
Response.CompleteListener
Listener for the request and response completed event.
|
static interface |
Response.ContentListener
Synchronous listener for the response content events.
|
static interface |
Response.DemandedContentListener
Asynchronous listener for the response content events.
|
static interface |
Response.FailureListener
Listener for the response failure event.
|
static interface |
Response.HeaderListener
Listener for a response header event.
|
static interface |
Response.HeadersListener
Listener for the response headers event.
|
static interface |
Response.Listener
Listener for all response events.
|
static interface |
Response.ResponseListener
Common, empty, super-interface for response listeners
|
static interface |
Response.SuccessListener
Listener for the response succeeded event.
|
Modifier and Type | Method and Description |
---|---|
boolean |
abort(Throwable cause)
Attempts to abort the receive of this response.
|
HttpFields |
getHeaders() |
<T extends Response.ResponseListener> |
getListeners(Class<T> listenerClass) |
String |
getReason() |
Request |
getRequest() |
int |
getStatus() |
HttpVersion |
getVersion() |
Request getRequest()
<T extends Response.ResponseListener> List<T> getListeners(Class<T> listenerClass)
T
- the type of classlistenerClass
- the listener classRequest.send(org.eclipse.jetty.client.api.Response.CompleteListener)
HttpVersion getVersion()
int getStatus()
String getReason()
getStatus()
HttpFields getHeaders()
boolean abort(Throwable cause)
cause
- the abort cause, must not be nullCopyright © 2010 - 2020 Adobe. All Rights Reserved