DefaultFullHttpRequest Class — netty Architecture
Architecture documentation for the DefaultFullHttpRequest class in DefaultFullHttpRequest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 2b20e07a_f990_744d_2f21_8b703a3340bd["DefaultFullHttpRequest"] 1d1c105d_fc2e_c36b_f51e_b9fde06e2ac2["DefaultFullHttpRequest.java"] 2b20e07a_f990_744d_2f21_8b703a3340bd -->|defined in| 1d1c105d_fc2e_c36b_f51e_b9fde06e2ac2 d6813003_26dd_9fa2_592f_27718f3eba0e["DefaultFullHttpRequest()"] 2b20e07a_f990_744d_2f21_8b703a3340bd -->|method| d6813003_26dd_9fa2_592f_27718f3eba0e 6ca92e71_500f_3599_04e4_25c9c8220ef0["HttpHeaders()"] 2b20e07a_f990_744d_2f21_8b703a3340bd -->|method| 6ca92e71_500f_3599_04e4_25c9c8220ef0 ae5ed8fb_d958_4359_e6df_541951a538fd["ByteBuf()"] 2b20e07a_f990_744d_2f21_8b703a3340bd -->|method| ae5ed8fb_d958_4359_e6df_541951a538fd c76c93eb_6aff_689e_a4ec_5b223a812e40["refCnt()"] 2b20e07a_f990_744d_2f21_8b703a3340bd -->|method| c76c93eb_6aff_689e_a4ec_5b223a812e40 0ce91c48_ec35_f624_67d9_791ccb5b24ee["FullHttpRequest()"] 2b20e07a_f990_744d_2f21_8b703a3340bd -->|method| 0ce91c48_ec35_f624_67d9_791ccb5b24ee c6b857f8_972f_5334_1984_f041737d4763["release()"] 2b20e07a_f990_744d_2f21_8b703a3340bd -->|method| c6b857f8_972f_5334_1984_f041737d4763 fe8d7fe9_60bd_6d0d_e80b_3ca81c5f23c0["hashCode()"] 2b20e07a_f990_744d_2f21_8b703a3340bd -->|method| fe8d7fe9_60bd_6d0d_e80b_3ca81c5f23c0 76191006_b115_5d25_d11c_a9c78da42f39["equals()"] 2b20e07a_f990_744d_2f21_8b703a3340bd -->|method| 76191006_b115_5d25_d11c_a9c78da42f39 18cb852c_356d_4b7c_6cb7_92ee99c190ff["String()"] 2b20e07a_f990_744d_2f21_8b703a3340bd -->|method| 18cb852c_356d_4b7c_6cb7_92ee99c190ff
Relationship Graph
Source Code
codec-http/src/main/java/io/netty/handler/codec/http/DefaultFullHttpRequest.java lines 30–236
public class DefaultFullHttpRequest extends DefaultHttpRequest implements FullHttpRequest {
private final ByteBuf content;
private final HttpHeaders trailingHeader;
/**
* Used to cache the value of the hash code and avoid {@link IllegalReferenceCountException}.
*/
private int hash;
/**
* Create a full HTTP response with the given HTTP version, method, and URI.
*/
public DefaultFullHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri) {
this(httpVersion, method, uri, Unpooled.buffer(0), headersFactory(), trailersFactory());
}
/**
* Create a full HTTP response with the given HTTP version, method, URI, and contents.
*/
public DefaultFullHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri, ByteBuf content) {
this(httpVersion, method, uri, content, headersFactory(), trailersFactory());
}
/**
* Create a full HTTP response with the given HTTP version, method, URI, and optional validation.
* @deprecated Use the {@link #DefaultFullHttpRequest(HttpVersion, HttpMethod, String, ByteBuf,
* HttpHeadersFactory, HttpHeadersFactory)} constructor instead.
*/
@Deprecated
public DefaultFullHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri, boolean validateHeaders) {
this(httpVersion, method, uri, Unpooled.buffer(0),
headersFactory().withValidation(validateHeaders),
trailersFactory().withValidation(validateHeaders));
}
/**
* Create a full HTTP response with the given HTTP version, method, URI, contents, and optional validation.
* @deprecated Use the {@link #DefaultFullHttpRequest(HttpVersion, HttpMethod, String, ByteBuf,
* HttpHeadersFactory, HttpHeadersFactory)} constructor instead.
*/
@Deprecated
public DefaultFullHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri,
ByteBuf content, boolean validateHeaders) {
this(httpVersion, method, uri, content,
headersFactory().withValidation(validateHeaders),
trailersFactory().withValidation(validateHeaders));
}
/**
* Create a full HTTP response with the given HTTP version, method, URI, contents,
* and factories for creating headers and trailers.
* <p>
* The recommended default header factory is {@link DefaultHttpHeadersFactory#headersFactory()},
* and the recommended default trailer factory is {@link DefaultHttpHeadersFactory#trailersFactory()}.
*/
public DefaultFullHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri,
ByteBuf content, HttpHeadersFactory headersFactory, HttpHeadersFactory trailersFactory) {
this(httpVersion, method, uri, content, headersFactory.newHeaders(), trailersFactory.newHeaders());
}
/**
* Create a full HTTP response with the given HTTP version, method, URI, contents, and header and trailer objects.
*/
public DefaultFullHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri,
ByteBuf content, HttpHeaders headers, HttpHeaders trailingHeader) {
this(httpVersion, method, uri, content, headers, trailingHeader, true);
}
/**
* Create a full HTTP response with the given HTTP version, method, URI, contents, and header and trailer objects.
*/
public DefaultFullHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri,
ByteBuf content, HttpHeaders headers, HttpHeaders trailingHeader, boolean validateRequestLine) {
super(httpVersion, method, uri, headers, validateRequestLine);
this.content = checkNotNull(content, "content");
this.trailingHeader = checkNotNull(trailingHeader, "trailingHeader");
}
@Override
public HttpHeaders trailingHeaders() {
return trailingHeader;
Source
Frequently Asked Questions
What is the DefaultFullHttpRequest class?
DefaultFullHttpRequest is a class in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/DefaultFullHttpRequest.java.
Where is DefaultFullHttpRequest defined?
DefaultFullHttpRequest is defined in codec-http/src/main/java/io/netty/handler/codec/http/DefaultFullHttpRequest.java at line 30.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free