class Netty4ClientHttpResponse extends AbstractClientHttpResponse
ClientHttpResponse
implementation that uses
Netty 4 to execute requests.Modifier and Type | Field and Description |
---|---|
private ByteBufInputStream |
body |
private ChannelHandlerContext |
context |
private HttpHeaders |
headers |
private FullHttpResponse |
nettyResponse |
Constructor and Description |
---|
Netty4ClientHttpResponse(ChannelHandlerContext context,
FullHttpResponse nettyResponse) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this response, freeing any resources created.
|
java.io.InputStream |
getBody()
Return the body of the message as an input stream.
|
HttpHeaders |
getHeaders()
Return the headers of this message.
|
int |
getRawStatusCode()
Return the HTTP status code of the response as integer
|
java.lang.String |
getStatusText()
Return the HTTP status text of the response.
|
getStatusCode
private final ChannelHandlerContext context
private final FullHttpResponse nettyResponse
private final ByteBufInputStream body
private volatile HttpHeaders headers
public Netty4ClientHttpResponse(ChannelHandlerContext context, FullHttpResponse nettyResponse)
public int getRawStatusCode() throws java.io.IOException
ClientHttpResponse
java.io.IOException
- in case of I/O errorspublic java.lang.String getStatusText() throws java.io.IOException
ClientHttpResponse
java.io.IOException
- in case of I/O errorspublic HttpHeaders getHeaders()
HttpMessage
null
)public java.io.InputStream getBody() throws java.io.IOException
HttpInputMessage
null
)java.io.IOException
- in case of I/O Errorspublic void close()
ClientHttpResponse