DefaultHttpResponse Class — netty Architecture
Architecture documentation for the DefaultHttpResponse class in DefaultHttpResponse.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 22aeca9c_0b69_5a9f_5e10_f52daba3b473["DefaultHttpResponse"] 3bc8c291_36cd_50d3_e143_df2399dd5f72["DefaultHttpResponse.java"] 22aeca9c_0b69_5a9f_5e10_f52daba3b473 -->|defined in| 3bc8c291_36cd_50d3_e143_df2399dd5f72 836f953d_d877_d2a5_4812_0cc84ac221f3["DefaultHttpResponse()"] 22aeca9c_0b69_5a9f_5e10_f52daba3b473 -->|method| 836f953d_d877_d2a5_4812_0cc84ac221f3 568cc6b5_e850_e08c_6c61_2e158cf8649b["HttpResponseStatus()"] 22aeca9c_0b69_5a9f_5e10_f52daba3b473 -->|method| 568cc6b5_e850_e08c_6c61_2e158cf8649b 72d87373_5ad3_64ab_a549_7387c2a94653["HttpResponse()"] 22aeca9c_0b69_5a9f_5e10_f52daba3b473 -->|method| 72d87373_5ad3_64ab_a549_7387c2a94653 84a41f76_67d6_917e_129b_08b005749871["String()"] 22aeca9c_0b69_5a9f_5e10_f52daba3b473 -->|method| 84a41f76_67d6_917e_129b_08b005749871 f8dfe978_658c_8491_4d41_92e5dda371ed["hashCode()"] 22aeca9c_0b69_5a9f_5e10_f52daba3b473 -->|method| f8dfe978_658c_8491_4d41_92e5dda371ed 69119dea_3357_d2ee_9694_b92353a54d3a["equals()"] 22aeca9c_0b69_5a9f_5e10_f52daba3b473 -->|method| 69119dea_3357_d2ee_9694_b92353a54d3a
Relationship Graph
Source Code
codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpResponse.java lines 26–145
public class DefaultHttpResponse extends DefaultHttpMessage implements HttpResponse {
private HttpResponseStatus status;
/**
* Creates a new instance.
*
* @param version the HTTP version of this response
* @param status the status of this response
*/
public DefaultHttpResponse(HttpVersion version, HttpResponseStatus status) {
this(version, status, headersFactory());
}
/**
* Creates a new instance.
*
* @param version the HTTP version of this response
* @param status the status of this response
* @param validateHeaders validate the header names and values when adding them to the {@link HttpHeaders}
* @deprecated Use the {@link #DefaultHttpResponse(HttpVersion, HttpResponseStatus, HttpHeadersFactory)} constructor
* instead.
*/
@Deprecated
public DefaultHttpResponse(HttpVersion version, HttpResponseStatus status, boolean validateHeaders) {
this(version, status, headersFactory().withValidation(validateHeaders));
}
/**
* Creates a new instance.
*
* @param version the HTTP version of this response
* @param status the status of this response
* @param validateHeaders validate the header names and values when adding them to the {@link HttpHeaders}
* @param singleFieldHeaders {@code true} to check and enforce that headers with the same name are appended
* to the same entry and comma separated.
* See <a href="https://tools.ietf.org/html/rfc7230#section-3.2.2">RFC 7230, 3.2.2</a>.
* {@code false} to allow multiple header entries with the same name to
* coexist.
* @deprecated Use the {@link #DefaultHttpResponse(HttpVersion, HttpResponseStatus, HttpHeadersFactory)} constructor
* instead.
*/
@Deprecated
public DefaultHttpResponse(HttpVersion version, HttpResponseStatus status, boolean validateHeaders,
boolean singleFieldHeaders) {
this(version, status, headersFactory().withValidation(validateHeaders)
.withCombiningHeaders(singleFieldHeaders));
}
/**
* Creates a new instance.
*
* @param version the HTTP version of this response
* @param status the status of this response
* @param headersFactory the {@link HttpHeadersFactory} used to create the headers for this HTTP Response.
* The recommended default is {@link DefaultHttpHeadersFactory#headersFactory()}.
*/
public DefaultHttpResponse(HttpVersion version, HttpResponseStatus status, HttpHeadersFactory headersFactory) {
this(version, status, headersFactory.newHeaders());
}
/**
* Creates a new instance.
*
* @param version the HTTP version of this response
* @param status the status of this response
* @param headers the headers for this HTTP Response
*/
public DefaultHttpResponse(HttpVersion version, HttpResponseStatus status, HttpHeaders headers) {
super(version, headers);
this.status = checkNotNull(status, "status");
}
@Override
@Deprecated
public HttpResponseStatus getStatus() {
return status();
}
@Override
public HttpResponseStatus status() {
Source
Frequently Asked Questions
What is the DefaultHttpResponse class?
DefaultHttpResponse is a class in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpResponse.java.
Where is DefaultHttpResponse defined?
DefaultHttpResponse is defined in codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpResponse.java at line 26.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free