public class DefaultHttpResponse extends DefaultHttpMessage implements HttpResponse
HttpResponse implementation.| Constructor and Description |
|---|
DefaultHttpResponse(HttpVersion version,
HttpResponseStatus status)
Creates a new instance.
|
DefaultHttpResponse(HttpVersion version,
HttpResponseStatus status,
boolean validateHeaders)
Creates a new instance.
|
DefaultHttpResponse(HttpVersion version,
HttpResponseStatus status,
boolean validateHeaders,
boolean singleFieldHeaders)
Creates a new instance.
|
DefaultHttpResponse(HttpVersion version,
HttpResponseStatus status,
HttpHeaders headers)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
HttpResponseStatus |
getStatus()
Deprecated.
|
HttpResponse |
setProtocolVersion(HttpVersion version)
Set the protocol version of this
HttpMessage |
HttpResponse |
setStatus(HttpResponseStatus status)
Set the status of this
HttpResponse. |
HttpResponseStatus |
status()
Returns the status of this
HttpResponse. |
String |
toString() |
equals, getProtocolVersion, hashCode, headers, protocolVersiondecoderResult, getDecoderResult, setDecoderResultclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetProtocolVersion, headers, protocolVersiongetDecoderResultdecoderResult, setDecoderResultpublic DefaultHttpResponse(HttpVersion version, HttpResponseStatus status)
version - the HTTP version of this responsestatus - the status of this responsepublic DefaultHttpResponse(HttpVersion version, HttpResponseStatus status, boolean validateHeaders)
version - the HTTP version of this responsestatus - the status of this responsevalidateHeaders - validate the header names and values when adding them to the HttpHeaderspublic DefaultHttpResponse(HttpVersion version, HttpResponseStatus status, boolean validateHeaders, boolean singleFieldHeaders)
version - the HTTP version of this responsestatus - the status of this responsevalidateHeaders - validate the header names and values when adding them to the HttpHeaderssingleFieldHeaders - true to check and enforce that headers with the same name are appended
to the same entry and comma separated.
See RFC 7230, 3.2.2.
false to allow multiple header entries with the same name to
coexist.public DefaultHttpResponse(HttpVersion version, HttpResponseStatus status, HttpHeaders headers)
version - the HTTP version of this responsestatus - the status of this responseheaders - the headers for this HTTP Response@Deprecated public HttpResponseStatus getStatus()
getStatus in interface HttpResponsepublic HttpResponseStatus status()
HttpResponseHttpResponse.status in interface HttpResponseHttpResponseStatus of this HttpResponsepublic HttpResponse setStatus(HttpResponseStatus status)
HttpResponseHttpResponse.setStatus in interface HttpResponsepublic HttpResponse setProtocolVersion(HttpVersion version)
HttpMessageHttpMessagesetProtocolVersion in interface HttpMessagesetProtocolVersion in interface HttpResponsesetProtocolVersion in class DefaultHttpMessageCopyright © 2008–2017 The Netty Project. All rights reserved.