Top Description Constructors Methods
io.netty.handler.codec.http2

public final Class Http2ConnectionHandlerBuilder

extends AbstractHttp2ConnectionHandlerBuilder<Http2ConnectionHandler, Http2ConnectionHandlerBuilder>
Class Inheritance
Annotations
@UnstableApi
Imports
io.netty.handler.codec.http2.Http2HeadersEncoder.SensitivityDetector, io.netty.util.internal.UnstableApi

Builder which builds Http2ConnectionHandler objects.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Http2ConnectionHandler
protected Http2ConnectionHandler
build(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder, Http2Settings initialSettings)

Implements abstract io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.build.

Implement this method to create a new Http2ConnectionHandler or its subtype instance.
public Http2ConnectionHandlerBuilder
public Http2ConnectionHandlerBuilder
public Http2ConnectionHandlerBuilder
decoupleCloseAndGoAway(boolean
true to make Channel#close() directly close the underlying transport, and not attempt graceful closure via GOAWAY.
decoupleCloseAndGoAway
)

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.decoupleCloseAndGoAway.

Determine if the Channel#close() should be coupled with goaway and graceful close.
public Http2ConnectionHandlerBuilder
encoderEnforceMaxConcurrentStreams(boolean encoderEnforceMaxConcurrentStreams)

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.encoderEnforceMaxConcurrentStreams.

Sets if the encoder should queue frames if the maximum number of concurrent streams would otherwise be exceeded.
public Http2ConnectionHandlerBuilder
public Http2ConnectionHandlerBuilder
flushPreface(boolean
true to automatically flush, false otherwise.
flushPreface
)

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.flushPreface.

Determine if the Preface should be automatically flushed when the Channel becomes active or not.
public Http2ConnectionHandlerBuilder
public Http2ConnectionHandlerBuilder
frameLogger(Http2FrameLogger frameLogger)

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.frameLogger.

Sets the logger that is used for the encoder and decoder.
public Http2ConnectionHandlerBuilder
gracefulShutdownTimeoutMillis(long gracefulShutdownTimeoutMillis)

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.gracefulShutdownTimeoutMillis.

Sets the graceful shutdown timeout of the Http2Connection in milliseconds.
public Http2ConnectionHandlerBuilder
public Http2ConnectionHandlerBuilder
initialHuffmanDecodeCapacity(int initialHuffmanDecodeCapacity)

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.initialHuffmanDecodeCapacity.

Deprecated
Does nothing, do not call.
public Http2ConnectionHandlerBuilder
initialSettings(Http2Settings settings)

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.initialSettings.

Sets the Http2Settings to use for the initial connection settings exchange.
public Http2Settings
initialSettings()

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.initialSettings.

Sets the Http2Settings to use for the initial connection settings exchange.
public Http2ConnectionHandlerBuilder
maxReservedStreams(int maxReservedStreams)

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.maxReservedStreams.

Set the maximum number of streams which can be in the reserved state at any given time.
public Http2ConnectionHandlerBuilder
server(boolean isServer)

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.server.

Sets if build() will to create a Http2Connection in server mode (true) or client mode (false).
public Http2ConnectionHandlerBuilder
validateHeaders(boolean validateHeaders)

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.validateHeaders.

Sets if HTTP headers should be validated according to RFC 7540, 8.1.2.6.
Inherited from io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder:
autoAckPingFrameautoAckSettingsFrameconnectiondecoderdecoderEnforceMaxConsecutiveEmptyDataFramesdecoderEnforceMaxConsecutiveEmptyDataFramesdecoderEnforceMaxRstFramesPerWindowdecoupleCloseAndGoAwayencoderencoderEnforceMaxConcurrentStreamsencoderEnforceMaxQueuedControlFramesencoderEnforceMaxQueuedControlFramesflushPrefaceframeListenerframeLoggergracefulShutdownTimeoutMillisheaderSensitivityDetectorisAutoAckPingFrameisAutoAckSettingsFrameisServerisValidateHeadersmaxReservedStreamspromisedRequestVerifierpromisedRequestVerifierself

Constructor Detail

Http2ConnectionHandlerBuilderback to summary
public Http2ConnectionHandlerBuilder()

Method Detail

buildback to summary
public Http2ConnectionHandler build()

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.build.

Doc from io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.build.

Create a new Http2ConnectionHandler.

Annotations
@Override
buildback to summary
protected Http2ConnectionHandler build(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder, Http2Settings initialSettings)

Implements abstract io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.build.

Doc from io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.build.

Implement this method to create a new Http2ConnectionHandler or its subtype instance.

The return of this method will be subject to the following:

Annotations
@Override
codecback to summary
public Http2ConnectionHandlerBuilder codec(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder)

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.codec.

Doc from io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.codec.

Sets the Http2ConnectionDecoder and Http2ConnectionEncoder to use.

Annotations
@Override
connectionback to summary
public Http2ConnectionHandlerBuilder connection(Http2Connection connection)

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.connection.

Doc from io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.connection.

Sets the Http2Connection to use.

Annotations
@Override
decoupleCloseAndGoAwayback to summary
public Http2ConnectionHandlerBuilder decoupleCloseAndGoAway(boolean decoupleCloseAndGoAway)

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.decoupleCloseAndGoAway.

Doc from io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.decoupleCloseAndGoAway.

Determine if the Channel#close() should be coupled with goaway and graceful close.

Parameters
decoupleCloseAndGoAway:boolean

true to make Channel#close() directly close the underlying transport, and not attempt graceful closure via GOAWAY.

Returns:Http2ConnectionHandlerBuilder

this.

Annotations
@Override
encoderEnforceMaxConcurrentStreamsback to summary
public Http2ConnectionHandlerBuilder encoderEnforceMaxConcurrentStreams(boolean encoderEnforceMaxConcurrentStreams)

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.encoderEnforceMaxConcurrentStreams.

Doc from io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.encoderEnforceMaxConcurrentStreams.

Sets if the encoder should queue frames if the maximum number of concurrent streams would otherwise be exceeded.

Annotations
@Override
encoderIgnoreMaxHeaderListSizeback to summary
public Http2ConnectionHandlerBuilder encoderIgnoreMaxHeaderListSize(boolean encoderIgnoreMaxHeaderListSize)

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.encoderIgnoreMaxHeaderListSize.

Doc from io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.encoderIgnoreMaxHeaderListSize.

Sets if the SETTINGS_MAX_HEADER_LIST_SIZE should be ignored when encoding headers.

Parameters
encoderIgnoreMaxHeaderListSize:boolean

true to ignore SETTINGS_MAX_HEADER_LIST_SIZE.

Returns:Http2ConnectionHandlerBuilder

this.

Annotations
@Override
flushPrefaceback to summary
public Http2ConnectionHandlerBuilder flushPreface(boolean flushPreface)

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.flushPreface.

Doc from io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.flushPreface.

Determine if the Preface should be automatically flushed when the Channel becomes active or not.

Client may choose to opt-out from this automatic behavior and manage flush manually if it's ready to send request frames immediately after the preface. It may help to avoid unnecessary latency.

Parameters
flushPreface:boolean

true to automatically flush, false otherwise.

Returns:Http2ConnectionHandlerBuilder

this.

Annotations
@Override
frameListenerback to summary
public Http2ConnectionHandlerBuilder frameListener(Http2FrameListener frameListener)

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.frameListener.

Doc from io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.frameListener.

Sets the listener of inbound frames. This listener will only be set if the decoder's listener is null.

Annotations
@Override
frameLoggerback to summary
public Http2ConnectionHandlerBuilder frameLogger(Http2FrameLogger frameLogger)

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.frameLogger.

Doc from io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.frameLogger.

Sets the logger that is used for the encoder and decoder.

Annotations
@Override
gracefulShutdownTimeoutMillisback to summary
public Http2ConnectionHandlerBuilder gracefulShutdownTimeoutMillis(long gracefulShutdownTimeoutMillis)

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.gracefulShutdownTimeoutMillis.

Doc from io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.gracefulShutdownTimeoutMillis.

Sets the graceful shutdown timeout of the Http2Connection in milliseconds.

Annotations
@Override
headerSensitivityDetectorback to summary
public Http2ConnectionHandlerBuilder headerSensitivityDetector(Http2HeadersEncoder.SensitivityDetector headerSensitivityDetector)

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.headerSensitivityDetector.

Doc from io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.headerSensitivityDetector.

Sets the SensitivityDetector to use.

Annotations
@Override
initialHuffmanDecodeCapacityback to summary
public Http2ConnectionHandlerBuilder initialHuffmanDecodeCapacity(int initialHuffmanDecodeCapacity)

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.initialHuffmanDecodeCapacity.

Doc from io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.initialHuffmanDecodeCapacity.

Deprecated

Does nothing, do not call.

Annotations
@Override
@Deprecated
initialSettingsback to summary
public Http2ConnectionHandlerBuilder initialSettings(Http2Settings settings)

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.initialSettings.

Doc from io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.initialSettings.

Sets the Http2Settings to use for the initial connection settings exchange.

Annotations
@Override
initialSettingsback to summary
public Http2Settings initialSettings()

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.initialSettings.

Doc from io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.initialSettings.

Sets the Http2Settings to use for the initial connection settings exchange.

Annotations
@Override
maxReservedStreamsback to summary
public Http2ConnectionHandlerBuilder maxReservedStreams(int maxReservedStreams)

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.maxReservedStreams.

Doc from io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.maxReservedStreams.

Set the maximum number of streams which can be in the reserved state at any given time.

Annotations
@Override
serverback to summary
public Http2ConnectionHandlerBuilder server(boolean isServer)

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.server.

Doc from io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.server.

Sets if build() will to create a Http2Connection in server mode (true) or client mode (false).

Annotations
@Override
validateHeadersback to summary
public Http2ConnectionHandlerBuilder validateHeaders(boolean validateHeaders)

Overrides io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.validateHeaders.

Doc from io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.validateHeaders.

Sets if HTTP headers should be validated according to RFC 7540, 8.1.2.6.

Annotations
@Override