public class Response extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Throwable |
cause |
protected boolean |
failed |
protected Reader |
reader |
protected Request |
request |
| Constructor and Description |
|---|
Response(Request request,
Reader reader) |
| Modifier and Type | Method and Description |
|---|---|
Throwable |
failureCause() |
io.netty.handler.codec.http.HttpHeaders |
getHeaders() |
io.netty.handler.codec.http.HttpVersion |
getProtocolVersion() |
io.netty.handler.codec.http.HttpResponseStatus |
getStatus() |
boolean |
hasFailed() |
boolean |
isChunked() |
boolean |
isCompleted() |
boolean |
isRedirected() |
void |
markFailed(Throwable cause)
Mark the request as failed, this will set this response as completed
and notify all listeners that the request failed
|
Request |
request() |
void |
setChunked(boolean chunked) |
void |
setCompleted(boolean completed) |
void |
setHeaders(io.netty.handler.codec.http.HttpHeaders headers) |
void |
setProtocolVersion(io.netty.handler.codec.http.HttpVersion protocolVersion) |
void |
setStatus(io.netty.handler.codec.http.HttpResponseStatus status) |
String |
toString() |
void |
write(io.netty.buffer.ByteBuf content) |
protected final Request request
protected boolean failed
protected Throwable cause
protected Reader reader
public boolean isChunked()
public void setChunked(boolean chunked)
public io.netty.handler.codec.http.HttpVersion getProtocolVersion()
public void setProtocolVersion(io.netty.handler.codec.http.HttpVersion protocolVersion)
public io.netty.handler.codec.http.HttpResponseStatus getStatus()
public void setStatus(io.netty.handler.codec.http.HttpResponseStatus status)
public io.netty.handler.codec.http.HttpHeaders getHeaders()
public void setHeaders(io.netty.handler.codec.http.HttpHeaders headers)
public void write(io.netty.buffer.ByteBuf content)
public void markFailed(Throwable cause)
cause - an optional exception that may have been the cause of the failurepublic boolean hasFailed()
public Throwable failureCause()
public boolean isCompleted()
public void setCompleted(boolean completed)
public Request request()
public boolean isRedirected()
Copyright © 2012-2015. All Rights Reserved.