Http2HeadersEncoder Type — netty Architecture
Architecture documentation for the Http2HeadersEncoder type/interface in Http2HeadersEncoder.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 315eba78_1747_8d69_01b6_231d405ad4bc["Http2HeadersEncoder"] 5970f62b_2e0b_1ad7_c0b0_4df1f32cfed4["Http2HeadersEncoder.java"] 315eba78_1747_8d69_01b6_231d405ad4bc -->|defined in| 5970f62b_2e0b_1ad7_c0b0_4df1f32cfed4 style 315eba78_1747_8d69_01b6_231d405ad4bc fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/main/java/io/netty/handler/codec/http2/Http2HeadersEncoder.java lines 23–108
public interface Http2HeadersEncoder {
/**
* Configuration related elements for the {@link Http2HeadersEncoder} interface
*/
interface Configuration {
/**
* Represents the value for
* <a href="https://tools.ietf.org/html/rfc7540#section-6.5.2">SETTINGS_HEADER_TABLE_SIZE</a>.
* This method should only be called by Netty (not users) as a result of a receiving a {@code SETTINGS} frame.
*/
void maxHeaderTableSize(long max) throws Http2Exception;
/**
* Represents the value for
* <a href="https://tools.ietf.org/html/rfc7540#section-6.5.2">SETTINGS_HEADER_TABLE_SIZE</a>.
* The initial value returned by this method must be {@link Http2CodecUtil#DEFAULT_HEADER_TABLE_SIZE}.
*/
long maxHeaderTableSize();
/**
* Represents the value for
* <a href="https://tools.ietf.org/html/rfc7540#section-6.5.2">SETTINGS_MAX_HEADER_LIST_SIZE</a>.
* This method should only be called by Netty (not users) as a result of a receiving a {@code SETTINGS} frame.
*/
void maxHeaderListSize(long max) throws Http2Exception;
/**
* Represents the value for
* <a href="https://tools.ietf.org/html/rfc7540#section-6.5.2">SETTINGS_MAX_HEADER_LIST_SIZE</a>.
*/
long maxHeaderListSize();
}
/**
* Determine if a header name/value pair is treated as
* <a href="https://tools.ietf.org/html/rfc7541#section-7.1.3">sensitive</a>.
* If the object can be dynamically modified and shared across multiple connections it may need to be thread safe.
*/
interface SensitivityDetector {
/**
* Determine if a header {@code name}/{@code value} pair should be treated as
* <a href="https://tools.ietf.org/html/rfc7541#section-7.1.3">sensitive</a>.
*
* @param name The name for the header.
* @param value The value of the header.
* @return {@code true} if a header {@code name}/{@code value} pair should be treated as
* <a href="https://tools.ietf.org/html/rfc7541#section-7.1.3">sensitive</a>.
* {@code false} otherwise.
*/
boolean isSensitive(CharSequence name, CharSequence value);
}
/**
* Encodes the given headers and writes the output headers block to the given output buffer.
*
* @param streamId the identifier of the stream for which the headers are encoded.
* @param headers the headers to be encoded.
* @param buffer the buffer to receive the encoded headers.
*/
void encodeHeaders(int streamId, Http2Headers headers, ByteBuf buffer) throws Http2Exception;
/**
* Get the {@link Configuration} for this {@link Http2HeadersEncoder}
*/
Configuration configuration();
/**
* Always return {@code false} for {@link SensitivityDetector#isSensitive(CharSequence, CharSequence)}.
*/
SensitivityDetector NEVER_SENSITIVE = new SensitivityDetector() {
@Override
public boolean isSensitive(CharSequence name, CharSequence value) {
return false;
}
};
/**
* Always return {@code true} for {@link SensitivityDetector#isSensitive(CharSequence, CharSequence)}.
*/
SensitivityDetector ALWAYS_SENSITIVE = new SensitivityDetector() {
@Override
Source
Frequently Asked Questions
What is the Http2HeadersEncoder type?
Http2HeadersEncoder is a type/interface in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/Http2HeadersEncoder.java.
Where is Http2HeadersEncoder defined?
Http2HeadersEncoder is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/Http2HeadersEncoder.java at line 23.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free