public class DefaultHttpResponse extends DefaultHttpMessage implements HttpResponse
HttpResponse
implementation.构造器和说明 |
---|
DefaultHttpResponse(HttpVersion version,
HttpResponseStatus status)
Creates a new instance.
|
DefaultHttpResponse(HttpVersion version,
HttpResponseStatus status,
boolean validateHeaders)
已过时。
Use the
DefaultHttpResponse(HttpVersion, HttpResponseStatus, HttpHeadersFactory) constructor
instead. |
DefaultHttpResponse(HttpVersion version,
HttpResponseStatus status,
boolean validateHeaders,
boolean singleFieldHeaders)
已过时。
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.
|
限定符和类型 | 方法和说明 |
---|---|
boolean |
equals(java.lang.Object o) |
HttpResponseStatus |
getStatus()
已过时。
|
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 . |
java.lang.String |
toString() |
getProtocolVersion, headers, protocolVersion
decoderResult, getDecoderResult, setDecoderResult
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
在接口中 HttpResponse
public HttpResponseStatus status()
HttpResponse
HttpResponse
.status
在接口中 HttpResponse
HttpResponseStatus
of this HttpResponse
public HttpResponse setStatus(HttpResponseStatus status)
HttpResponse
HttpResponse
.setStatus
在接口中 HttpResponse
public HttpResponse setProtocolVersion(HttpVersion version)
HttpMessage
HttpMessage
setProtocolVersion
在接口中 HttpMessage
setProtocolVersion
在接口中 HttpResponse
setProtocolVersion
在类中 DefaultHttpMessage
public java.lang.String toString()
toString
在类中 java.lang.Object
public int hashCode()
hashCode
在类中 DefaultHttpMessage
public boolean equals(java.lang.Object o)
equals
在类中 DefaultHttpMessage