HttpDecoderConfig.java — netty Source File
Architecture documentation for HttpDecoderConfig.java, a java file in the netty codebase.
Entity Profile
Relationship Graph
Source Code
/*
* Copyright 2023 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.handler.codec.http;
import static io.netty.util.internal.ObjectUtil.checkNotNull;
import static io.netty.util.internal.ObjectUtil.checkPositive;
/**
* A configuration object for specifying the behaviour of {@link HttpObjectDecoder} and its subclasses.
* <p>
* The {@link HttpDecoderConfig} objects are mutable to reduce allocation,
* but also {@link Cloneable} in case a defensive copy is needed.
*/
public final class HttpDecoderConfig implements Cloneable {
private int maxChunkSize = HttpObjectDecoder.DEFAULT_MAX_CHUNK_SIZE;
private boolean chunkedSupported = HttpObjectDecoder.DEFAULT_CHUNKED_SUPPORTED;
private boolean allowPartialChunks = HttpObjectDecoder.DEFAULT_ALLOW_PARTIAL_CHUNKS;
private HttpHeadersFactory headersFactory = DefaultHttpHeadersFactory.headersFactory();
private HttpHeadersFactory trailersFactory = DefaultHttpHeadersFactory.trailersFactory();
private boolean allowDuplicateContentLengths = HttpObjectDecoder.DEFAULT_ALLOW_DUPLICATE_CONTENT_LENGTHS;
private int maxInitialLineLength = HttpObjectDecoder.DEFAULT_MAX_INITIAL_LINE_LENGTH;
private int maxHeaderSize = HttpObjectDecoder.DEFAULT_MAX_HEADER_SIZE;
private int initialBufferSize = HttpObjectDecoder.DEFAULT_INITIAL_BUFFER_SIZE;
private boolean strictLineParsing = HttpObjectDecoder.DEFAULT_STRICT_LINE_PARSING;
public int getInitialBufferSize() {
return initialBufferSize;
}
/**
* Set the initial size of the temporary buffer used when parsing the lines of the HTTP headers.
*
* @param initialBufferSize The buffer size in bytes.
* @return This decoder config.
*/
public HttpDecoderConfig setInitialBufferSize(int initialBufferSize) {
checkPositive(initialBufferSize, "initialBufferSize");
this.initialBufferSize = initialBufferSize;
return this;
}
public int getMaxInitialLineLength() {
return maxInitialLineLength;
}
/**
* Set the maximum length of the first line of the HTTP header.
// ... (199 more lines)
Domain
Subdomains
Classes
Source
Frequently Asked Questions
What does HttpDecoderConfig.java do?
HttpDecoderConfig.java is a source file in the netty codebase, written in java. It belongs to the ProtocolCodecs domain, HTTP subdomain.
Where is HttpDecoderConfig.java in the architecture?
HttpDecoderConfig.java is located at codec-http/src/main/java/io/netty/handler/codec/http/HttpDecoderConfig.java (domain: ProtocolCodecs, subdomain: HTTP, directory: codec-http/src/main/java/io/netty/handler/codec/http).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free