DefaultFullHttpResponse Class — netty Architecture
Architecture documentation for the DefaultFullHttpResponse class in DefaultFullHttpResponse.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 3ae88156_98c6_a64e_0c88_c32ba22ffd4c["DefaultFullHttpResponse"] e2837987_25f9_cc7b_a440_65df42f1ad32["DefaultFullHttpResponse.java"] 3ae88156_98c6_a64e_0c88_c32ba22ffd4c -->|defined in| e2837987_25f9_cc7b_a440_65df42f1ad32 4348c4e2_2350_a3f2_267a_ccfa87fae302["DefaultFullHttpResponse()"] 3ae88156_98c6_a64e_0c88_c32ba22ffd4c -->|method| 4348c4e2_2350_a3f2_267a_ccfa87fae302 16650e48_8120_3c7a_25fc_e905318be625["HttpHeaders()"] 3ae88156_98c6_a64e_0c88_c32ba22ffd4c -->|method| 16650e48_8120_3c7a_25fc_e905318be625 3f581808_ae60_5302_26e0_f5dbc2b66fa3["ByteBuf()"] 3ae88156_98c6_a64e_0c88_c32ba22ffd4c -->|method| 3f581808_ae60_5302_26e0_f5dbc2b66fa3 aa4eeefb_0d57_1b5f_7546_31c159f69a0c["refCnt()"] 3ae88156_98c6_a64e_0c88_c32ba22ffd4c -->|method| aa4eeefb_0d57_1b5f_7546_31c159f69a0c f337bb42_f974_78fc_6c4f_de21569002cd["FullHttpResponse()"] 3ae88156_98c6_a64e_0c88_c32ba22ffd4c -->|method| f337bb42_f974_78fc_6c4f_de21569002cd acf0f9f5_93fd_cc3a_4485_0d13f57e9327["release()"] 3ae88156_98c6_a64e_0c88_c32ba22ffd4c -->|method| acf0f9f5_93fd_cc3a_4485_0d13f57e9327 6f4bc0e5_3583_ec32_6b40_196af3f6bd63["hashCode()"] 3ae88156_98c6_a64e_0c88_c32ba22ffd4c -->|method| 6f4bc0e5_3583_ec32_6b40_196af3f6bd63 85b39e27_e927_661d_6825_60d9f241e5bb["equals()"] 3ae88156_98c6_a64e_0c88_c32ba22ffd4c -->|method| 85b39e27_e927_661d_6825_60d9f241e5bb a54569d8_85d4_9db0_51a8_be337cdfe6c0["String()"] 3ae88156_98c6_a64e_0c88_c32ba22ffd4c -->|method| a54569d8_85d4_9db0_51a8_be337cdfe6c0
Relationship Graph
Source Code
codec-http/src/main/java/io/netty/handler/codec/http/DefaultFullHttpResponse.java lines 30–255
public class DefaultFullHttpResponse extends DefaultHttpResponse implements FullHttpResponse {
private final ByteBuf content;
private final HttpHeaders trailingHeaders;
/**
* Used to cache the value of the hash code and avoid {@link IllegalReferenceCountException}.
*/
private int hash;
/**
* Create an empty HTTP response with the given HTTP version and status.
*/
public DefaultFullHttpResponse(HttpVersion version, HttpResponseStatus status) {
this(version, status, Unpooled.buffer(0), headersFactory(), trailersFactory());
}
/**
* Create an HTTP response with the given HTTP version, status, and contents.
*/
public DefaultFullHttpResponse(HttpVersion version, HttpResponseStatus status, ByteBuf content) {
this(version, status, content, headersFactory(), trailersFactory());
}
/**
* Create an empty HTTP response with the given HTTP version, status, and optional header validation.
*
* @deprecated Prefer the {@link #DefaultFullHttpResponse(HttpVersion, HttpResponseStatus, ByteBuf,
* HttpHeadersFactory, HttpHeadersFactory)} constructor instead.
*/
@Deprecated
public DefaultFullHttpResponse(HttpVersion version, HttpResponseStatus status, boolean validateHeaders) {
this(version, status, Unpooled.buffer(0),
headersFactory().withValidation(validateHeaders),
trailersFactory().withValidation(validateHeaders));
}
/**
* Create an empty HTTP response with the given HTTP version, status, optional header validation,
* and optional header combining.
*
* @deprecated Prefer the {@link #DefaultFullHttpResponse(HttpVersion, HttpResponseStatus, ByteBuf,
* HttpHeadersFactory, HttpHeadersFactory)} constructor instead.
*/
@Deprecated
public DefaultFullHttpResponse(HttpVersion version, HttpResponseStatus status, boolean validateHeaders,
boolean singleFieldHeaders) {
this(version, status, Unpooled.buffer(0),
headersFactory().withValidation(validateHeaders).withCombiningHeaders(singleFieldHeaders),
trailersFactory().withValidation(validateHeaders).withCombiningHeaders(singleFieldHeaders));
}
/**
* Create an HTTP response with the given HTTP version, status, contents, and optional header validation.
*
* @deprecated Prefer the {@link #DefaultFullHttpResponse(HttpVersion, HttpResponseStatus, ByteBuf,
* HttpHeadersFactory, HttpHeadersFactory)} constructor instead.
*/
@Deprecated
public DefaultFullHttpResponse(HttpVersion version, HttpResponseStatus status,
ByteBuf content, boolean validateHeaders) {
this(version, status, content,
headersFactory().withValidation(validateHeaders),
trailersFactory().withValidation(validateHeaders));
}
/**
* Create an HTTP response with the given HTTP version, status, contents, optional header validation,
* and optional header combining.
*
* @deprecated Prefer the {@link #DefaultFullHttpResponse(HttpVersion, HttpResponseStatus, ByteBuf,
* HttpHeadersFactory, HttpHeadersFactory)} constructor instead.
*/
@Deprecated
public DefaultFullHttpResponse(HttpVersion version, HttpResponseStatus status,
ByteBuf content, boolean validateHeaders, boolean singleFieldHeaders) {
this(version, status, content,
headersFactory().withValidation(validateHeaders).withCombiningHeaders(singleFieldHeaders),
trailersFactory().withValidation(validateHeaders).withCombiningHeaders(singleFieldHeaders));
}
Source
Frequently Asked Questions
What is the DefaultFullHttpResponse class?
DefaultFullHttpResponse is a class in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/DefaultFullHttpResponse.java.
Where is DefaultFullHttpResponse defined?
DefaultFullHttpResponse is defined in codec-http/src/main/java/io/netty/handler/codec/http/DefaultFullHttpResponse.java at line 30.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free