Home / Class/ HttpResponseDecoder Class — netty Architecture

HttpResponseDecoder Class — netty Architecture

Architecture documentation for the HttpResponseDecoder class in HttpResponseDecoder.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  d976573b_bf0e_cbbd_6b2e_7aa8cb729bf7["HttpResponseDecoder"]
  6db1db31_433f_adf7_128a_a3cf1a4c7159["HttpResponseDecoder.java"]
  d976573b_bf0e_cbbd_6b2e_7aa8cb729bf7 -->|defined in| 6db1db31_433f_adf7_128a_a3cf1a4c7159
  4f629eb6_db6d_00af_28e2_66c5c8978bce["HttpResponseDecoder()"]
  d976573b_bf0e_cbbd_6b2e_7aa8cb729bf7 -->|method| 4f629eb6_db6d_00af_28e2_66c5c8978bce
  07fe3bde_8324_b492_d951_982c57dc3a57["HttpMessage()"]
  d976573b_bf0e_cbbd_6b2e_7aa8cb729bf7 -->|method| 07fe3bde_8324_b492_d951_982c57dc3a57
  21afcdde_8b76_2528_83ae_52da462c520b["isDecodingRequest()"]
  d976573b_bf0e_cbbd_6b2e_7aa8cb729bf7 -->|method| 21afcdde_8b76_2528_83ae_52da462c520b

Relationship Graph

Source Code

codec-http/src/main/java/io/netty/handler/codec/http/HttpResponseDecoder.java lines 119–229

public class HttpResponseDecoder extends HttpObjectDecoder {

    private static final HttpResponseStatus UNKNOWN_STATUS = new HttpResponseStatus(999, "Unknown");

    /**
     * Creates a new instance with the default
     * {@code maxInitialLineLength (4096)}, {@code maxHeaderSize (8192)}, and
     * {@code maxChunkSize (8192)}.
     * @see HttpDecoderConfig HttpDecoderConfig API documentation for detailed descriptions of
     * the configuration parameters.
     */
    public HttpResponseDecoder() {
    }

    /**
     * Creates a new instance with the specified parameters.
     *
     * @param maxInitialLineLength the initial size of the temporary buffer used when parsing the lines of the
     * HTTP headers.
     * @param maxHeaderSize the maximum permitted combined size of all headers in any one response.
     * @param maxChunkSize The maximum amount of data that the decoder will buffer
     * before sending chunks down the pipeline.
     * @see HttpDecoderConfig HttpDecoderConfig API documentation for detailed descriptions of
     * the configuration parameters.
     */
    public HttpResponseDecoder(
            int maxInitialLineLength, int maxHeaderSize, int maxChunkSize) {
        super(new HttpDecoderConfig()
                .setMaxInitialLineLength(maxInitialLineLength)
                .setMaxHeaderSize(maxHeaderSize)
                .setMaxChunkSize(maxChunkSize));
    }

    /**
     * @deprecated Prefer the {@link #HttpResponseDecoder(HttpDecoderConfig)} constructor.
     * @see HttpDecoderConfig HttpDecoderConfig API documentation for detailed descriptions of
     * the configuration parameters.
     */
    @Deprecated
    public HttpResponseDecoder(
            int maxInitialLineLength, int maxHeaderSize, int maxChunkSize, boolean validateHeaders) {
        super(maxInitialLineLength, maxHeaderSize, maxChunkSize, DEFAULT_CHUNKED_SUPPORTED, validateHeaders);
    }

    /**
     * @deprecated Prefer the {@link #HttpResponseDecoder(HttpDecoderConfig)} constructor.
     * @see HttpDecoderConfig HttpDecoderConfig API documentation for detailed descriptions of
     * the configuration parameters.
     */
    @Deprecated
    public HttpResponseDecoder(
            int maxInitialLineLength, int maxHeaderSize, int maxChunkSize, boolean validateHeaders,
            int initialBufferSize) {
        super(maxInitialLineLength, maxHeaderSize, maxChunkSize, DEFAULT_CHUNKED_SUPPORTED, validateHeaders,
              initialBufferSize);
    }

    /**
     * @deprecated Prefer the {@link #HttpResponseDecoder(HttpDecoderConfig)} constructor.
     * @see HttpDecoderConfig HttpDecoderConfig API documentation for detailed descriptions of
     * the configuration parameters.
     */
    @Deprecated
    public HttpResponseDecoder(
            int maxInitialLineLength, int maxHeaderSize, int maxChunkSize, boolean validateHeaders,
            int initialBufferSize, boolean allowDuplicateContentLengths) {
        super(maxInitialLineLength, maxHeaderSize, maxChunkSize, DEFAULT_CHUNKED_SUPPORTED, validateHeaders,
              initialBufferSize, allowDuplicateContentLengths);
    }

    /**
     * @deprecated Prefer the {@link #HttpResponseDecoder(HttpDecoderConfig)} constructor.
     * @see HttpDecoderConfig HttpDecoderConfig API documentation for detailed descriptions of
     * the configuration parameters.
     */
    @Deprecated
    public HttpResponseDecoder(
            int maxInitialLineLength, int maxHeaderSize, int maxChunkSize, boolean validateHeaders,
            int initialBufferSize, boolean allowDuplicateContentLengths, boolean allowPartialChunks) {
        super(maxInitialLineLength, maxHeaderSize, maxChunkSize, DEFAULT_CHUNKED_SUPPORTED, validateHeaders,
              initialBufferSize, allowDuplicateContentLengths, allowPartialChunks);

Frequently Asked Questions

What is the HttpResponseDecoder class?
HttpResponseDecoder is a class in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/HttpResponseDecoder.java.
Where is HttpResponseDecoder defined?
HttpResponseDecoder is defined in codec-http/src/main/java/io/netty/handler/codec/http/HttpResponseDecoder.java at line 119.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free