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, protocolVersion
decoderResult, getDecoderResult, setDecoderResult
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getProtocolVersion, headers, protocolVersion
getDecoderResult
decoderResult, setDecoderResult
public 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 HttpHeaders
public 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 HttpHeaders
singleFieldHeaders
- 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 HttpResponse
public HttpResponseStatus status()
HttpResponse
HttpResponse
.status
in interface HttpResponse
HttpResponseStatus
of this HttpResponse
public HttpResponse setStatus(HttpResponseStatus status)
HttpResponse
HttpResponse
.setStatus
in interface HttpResponse
public HttpResponse setProtocolVersion(HttpVersion version)
HttpMessage
HttpMessage
setProtocolVersion
in interface HttpMessage
setProtocolVersion
in interface HttpResponse
setProtocolVersion
in class DefaultHttpMessage
Copyright © 2008–2017 The Netty Project. All rights reserved.