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(Charset charset) |
String |
getContentType()
Return the content-type header value.
|
List<Cookie> |
getCookies() |
String |
getHeader(String name) |
io.netty.handler.codec.http.HttpHeaders |
getHeaders() |
List<String> |
getHeaders(String name)
Return a
List of the response header value. |
SocketAddress |
getLocalAddress()
Get local address client initiated request from.
|
SocketAddress |
getRemoteAddress()
Get remote address client initiated request to.
|
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.
|
String |
toString()
Subclasses SHOULD implement toString() in a way that identifies the response for logging.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetResponseBody, getResponseBody, getResponseBodyAsByteBuffer, getResponseBodyAsBytes, getResponseBodyAsStreamprotected final List<HttpResponseBodyPart> bodyParts
protected final HttpResponseHeaders headers
protected final HttpResponseStatus status
protected ResponseBase(HttpResponseStatus status, HttpResponseHeaders headers, List<HttpResponseBodyPart> bodyParts)
public final int getStatusCode()
ResponsegetStatusCode in interface Responsepublic final String getStatusText()
ResponsegetStatusText in interface Responsepublic SocketAddress getRemoteAddress()
ResponsegetRemoteAddress in interface Responsenull
if asynchronous provider is unable to provide the remote addresspublic SocketAddress getLocalAddress()
ResponsegetLocalAddress in interface Responsenull
if asynchronous provider is unable to provide the local addresspublic final String getContentType()
ResponsegetContentType in interface Responsepublic final List<String> getHeaders(String name)
ResponseList of the response header value.getHeaders in interface Responsename - the header namepublic final io.netty.handler.codec.http.HttpHeaders getHeaders()
getHeaders in interface Responsepublic final boolean isRedirected()
ResponseisRedirected in interface Responsepublic List<Cookie> getCookies()
getCookies in interface ResponseCookie.public 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.