ContentResponseHttpContentResponse, HttpResponsepublic interface Response
Response represents a 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 | Description |
|---|---|---|
static interface |
Response.AsyncContentListener |
|
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 |
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 | Description |
|---|---|---|
boolean |
abort(java.lang.Throwable cause) |
Attempts to abort the receive of this response.
|
org.eclipse.jetty.http.HttpFields |
getHeaders() |
|
<T extends Response.ResponseListener> |
getListeners(java.lang.Class<T> listenerClass) |
|
java.lang.String |
getReason() |
|
Request |
getRequest() |
|
int |
getStatus() |
|
org.eclipse.jetty.http.HttpVersion |
getVersion() |
Request getRequest()
<T extends Response.ResponseListener> java.util.List<T> getListeners(java.lang.Class<T> listenerClass)
T - the type of classlistenerClass - the listener classRequest.send(org.eclipse.jetty.client.api.Response.CompleteListener)org.eclipse.jetty.http.HttpVersion getVersion()
int getStatus()
java.lang.String getReason()
getStatus()org.eclipse.jetty.http.HttpFields getHeaders()
boolean abort(java.lang.Throwable cause)
cause - the abort cause, must not be nullCopyright © 1995–2018 Webtide. All rights reserved.