public 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 and 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 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)
Request#send(CompleteListener)
HttpVersion getVersion()
int getStatus()
String getReason()
getStatus()
HttpFields getHeaders()
boolean abort(Throwable cause)
cause
- the abort cause, must not be nullCopyright © 1995-2015 Webtide. All Rights Reserved.