Package io.netty5.handler.codec.http2
Interface Http2HeadersEncoder
-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
DefaultHttp2HeadersEncoder
@UnstableApi public interface Http2HeadersEncoder extends AutoCloseable
EncodesHttp2Headersinto HPACK-encoded headers blocks.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceHttp2HeadersEncoder.ConfigurationConfiguration related elements for theHttp2HeadersEncoderinterfacestatic interfaceHttp2HeadersEncoder.SensitivityDetectorDetermine if a header name/value pair is treated as sensitive.
-
Field Summary
Fields Modifier and Type Field Description static Http2HeadersEncoder.SensitivityDetectorALWAYS_SENSITIVEAlways returntrueforHttp2HeadersEncoder.SensitivityDetector.isSensitive(CharSequence, CharSequence).static Http2HeadersEncoder.SensitivityDetectorNEVER_SENSITIVEAlways returnfalseforHttp2HeadersEncoder.SensitivityDetector.isSensitive(CharSequence, CharSequence).
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclose()Close the encoder and release all its associated data.Http2HeadersEncoder.Configurationconfiguration()Get theHttp2HeadersEncoder.Configurationfor thisHttp2HeadersEncodervoidencodeHeaders(int streamId, Http2Headers headers, io.netty5.buffer.Buffer buffer)Encodes the given headers and writes the output headers block to the given output buffer.
-
-
-
Field Detail
-
NEVER_SENSITIVE
static final Http2HeadersEncoder.SensitivityDetector NEVER_SENSITIVE
Always returnfalseforHttp2HeadersEncoder.SensitivityDetector.isSensitive(CharSequence, CharSequence).
-
ALWAYS_SENSITIVE
static final Http2HeadersEncoder.SensitivityDetector ALWAYS_SENSITIVE
Always returntrueforHttp2HeadersEncoder.SensitivityDetector.isSensitive(CharSequence, CharSequence).
-
-
Method Detail
-
close
default void close()
Close the encoder and release all its associated data. By default, this default method does nothing, but if needed, concrete encoders may override this method in order to clean up any resources when closed.- Specified by:
closein interfaceAutoCloseable- Throws:
IllegalStateException- If thisResourcehas already been closed.
-
encodeHeaders
void encodeHeaders(int streamId, Http2Headers headers, io.netty5.buffer.Buffer buffer) throws Http2ExceptionEncodes the given headers and writes the output headers block to the given output buffer.- Parameters:
streamId- the identifier of the stream for which the headers are encoded.headers- the headers to be encoded.buffer- the buffer to receive the encoded headers.- Throws:
Http2Exception
-
configuration
Http2HeadersEncoder.Configuration configuration()
Get theHttp2HeadersEncoder.Configurationfor thisHttp2HeadersEncoder
-
-