Response.ResponseBuilder| Constructor and Description | 
|---|
| NettyResponse(HttpResponseStatus status,
             HttpResponseHeaders headers,
             List<HttpResponseBodyPart> bodyParts) | 
| Modifier and Type | Method and Description | 
|---|---|
| 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  Listof the response header value. | 
| SocketAddress | getLocalAddress()Get local address client initiated request from. | 
| SocketAddress | getRemoteAddress()Get remote address client initiated request to. | 
| String | getResponseBody()Return the entire response body as a String. | 
| String | getResponseBody(Charset charset)Return the entire response body as a String. | 
| ByteBuffer | getResponseBodyAsByteBuffer()Return the entire response body as a ByteBuffer. | 
| byte[] | getResponseBodyAsBytes()Return the entire response body as a byte[]. | 
| InputStream | getResponseBodyAsStream()Returns an input stream for the response body. | 
| 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  AsyncHandlerIt will return false if the eitherAsyncHandler.onStatusReceived(HttpResponseStatus)orAsyncHandler.onHeadersReceived(HttpResponseHeaders)returnedAsyncHandler.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. | 
public NettyResponse(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 ResponseAsyncHandlerpublic byte[] getResponseBodyAsBytes()
ResponsegetResponseBodyAsBytes in interface Responsepublic ByteBuffer getResponseBodyAsByteBuffer()
ResponsegetResponseBodyAsByteBuffer in interface Responsepublic String getResponseBody()
ResponsegetResponseBody in interface Responsepublic String getResponseBody(Charset charset)
ResponsegetResponseBody in interface Responsecharset - the charset to use when decoding the streampublic InputStream getResponseBodyAsStream()
ResponsegetResponseBodyAsStream in interface ResponseCopyright © 2017. All Rights Reserved.