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)
Deprecated.
Use the
DefaultHttpResponse(HttpVersion, HttpResponseStatus, HttpHeadersFactory) constructor
instead. |
DefaultHttpResponse(HttpVersion version,
HttpResponseStatus status,
boolean validateHeaders,
boolean singleFieldHeaders)
Deprecated.
Use the
DefaultHttpResponse(HttpVersion, HttpResponseStatus, HttpHeadersFactory) constructor
instead. |
DefaultHttpResponse(HttpVersion version,
HttpResponseStatus status,
HttpHeaders headers)
Creates a new instance.
|
DefaultHttpResponse(HttpVersion version,
HttpResponseStatus status,
HttpHeadersFactory headersFactory)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
HttpResponseStatus |
getStatus()
Deprecated.
|
int |
hashCode() |
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() |
getProtocolVersion, 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 response@Deprecated public DefaultHttpResponse(HttpVersion version, HttpResponseStatus status, boolean validateHeaders)
DefaultHttpResponse(HttpVersion, HttpResponseStatus, HttpHeadersFactory)
constructor
instead.version
- the HTTP version of this responsestatus
- the status of this responsevalidateHeaders
- validate the header names and values when adding them to the HttpHeaders
@Deprecated public DefaultHttpResponse(HttpVersion version, HttpResponseStatus status, boolean validateHeaders, boolean singleFieldHeaders)
DefaultHttpResponse(HttpVersion, HttpResponseStatus, HttpHeadersFactory)
constructor
instead.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, HttpHeadersFactory headersFactory)
version
- the HTTP version of this responsestatus
- the status of this responseheadersFactory
- the HttpHeadersFactory
used to create the headers for this HTTP Response.
The recommended default is DefaultHttpHeadersFactory.headersFactory()
.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
public int hashCode()
hashCode
in class DefaultHttpMessage
public boolean equals(Object o)
equals
in class DefaultHttpMessage
Copyright © 2008–2024 The Netty Project. All rights reserved.