public abstract class ResponseBase extends Object implements Response
Response.ResponseBuilder| Modifier and Type | Field and Description |
|---|---|
protected List<HttpResponseBodyPart> |
bodyParts |
protected HttpResponseHeaders |
headers |
protected HttpResponseStatus |
status |
| Modifier | Constructor and Description |
|---|---|
protected |
ResponseBase(HttpResponseStatus status,
HttpResponseHeaders headers,
List<HttpResponseBodyPart> bodyParts) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract List<Cookie> |
buildCookies() |
protected Charset |
calculateCharset(String charset) |
String |
getContentType()
Return the content-type header value.
|
List<Cookie> |
getCookies()
Return the list of
Cookie. |
String |
getHeader(String name)
Return the response header
|
FluentCaseInsensitiveStringsMap |
getHeaders() |
List<String> |
getHeaders(String name)
Return a
List of the response header value. |
int |
getStatusCode()
Returns the status code for the request.
|
String |
getStatusText()
Returns the status text for the request.
|
Uri |
getUri()
Return the request
Uri. |
boolean |
hasResponseBody()
Return true if the response's body has been computed by an
AsyncHandler. |
boolean |
hasResponseHeaders()
Return true if the response's headers has been computed by an
AsyncHandler It will return false if the either
AsyncHandler.onStatusReceived(HttpResponseStatus) or AsyncHandler.onHeadersReceived(HttpResponseHeaders) returned AsyncHandler.STATE.ABORT |
boolean |
hasResponseStatus()
Return true if the response's status has been computed by an
AsyncHandler |
boolean |
isRedirected()
Return true if the response redirects to another object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetResponseBody, getResponseBody, getResponseBodyAsByteBuffer, getResponseBodyAsBytes, getResponseBodyAsStream, getResponseBodyExcerpt, getResponseBodyExcerpt, toStringprotected final HttpResponseStatus status
protected final HttpResponseHeaders headers
protected final List<HttpResponseBodyPart> bodyParts
protected ResponseBase(HttpResponseStatus status, HttpResponseHeaders headers, List<HttpResponseBodyPart> bodyParts)
public final int getStatusCode()
ResponsegetStatusCode in interface Responsepublic final String getStatusText()
ResponsegetStatusText in interface Responsepublic final String getContentType()
ResponsegetContentType in interface Responsepublic final String getHeader(String name)
Responsepublic final List<String> getHeaders(String name)
ResponseList of the response header value.getHeaders in interface Responsepublic final FluentCaseInsensitiveStringsMap getHeaders()
getHeaders in interface Responsepublic final boolean isRedirected()
ResponseisRedirected in interface Responsepublic List<Cookie> getCookies()
ResponseCookie.getCookies in interface Responsepublic boolean hasResponseStatus()
ResponseAsyncHandlerhasResponseStatus in interface ResponseAsyncHandlerpublic boolean hasResponseHeaders()
ResponseAsyncHandler It will return false if the either
AsyncHandler.onStatusReceived(HttpResponseStatus) or AsyncHandler.onHeadersReceived(HttpResponseHeaders) returned AsyncHandler.STATE.ABORThasResponseHeaders in interface ResponseAsyncHandlerpublic boolean hasResponseBody()
ResponseAsyncHandler. It will return false if the either AsyncHandler.onStatusReceived(HttpResponseStatus)
or AsyncHandler.onHeadersReceived(HttpResponseHeaders) returned AsyncHandler.STATE.ABORThasResponseBody in interface ResponseAsyncHandlerCopyright © 2015. All Rights Reserved.