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

public final Class HttpToHttp2ConnectionHandlerBuilder

extends AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler, HttpToHttp2ConnectionHandlerBuilder>
Class Inheritance
Annotations
@UnstableApi
Imports
io.netty.handler.codec.http.HttpScheme, io.netty.handler.codec.http2.Http2HeadersEncoder.SensitivityDetector, io.netty.util.internal.UnstableApi

Builder which builds HttpToHttp2ConnectionHandler objects.

Field Summary

Modifier and TypeField and Description
private HttpScheme

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public HttpToHttp2ConnectionHandler
protected HttpToHttp2ConnectionHandler
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 HttpToHttp2ConnectionHandlerBuilder
public HttpToHttp2ConnectionHandlerBuilder
public HttpToHttp2ConnectionHandlerBuilder
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 HttpToHttp2ConnectionHandlerBuilder
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 HttpToHttp2ConnectionHandlerBuilder
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 HttpToHttp2ConnectionHandlerBuilder
public HttpToHttp2ConnectionHandlerBuilder
frameLogger(Http2FrameLogger frameLogger)

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

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

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

Sets the graceful shutdown timeout of the Http2Connection in milliseconds.
public HttpToHttp2ConnectionHandlerBuilder
public HttpToHttp2ConnectionHandlerBuilder

Returns:

this.
httpScheme
(HttpScheme httpScheme)

Add scheme in Http2Headers if not already present.

public HttpToHttp2ConnectionHandlerBuilder
initialHuffmanDecodeCapacity(int initialHuffmanDecodeCapacity)

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

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

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

Sets the Http2Settings to use for the initial connection settings exchange.
public HttpToHttp2ConnectionHandlerBuilder
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 HttpToHttp2ConnectionHandlerBuilder
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:
autoAckPingFrameautoAckSettingsFrameconnectiondecoderdecoderEnforceMaxConsecutiveEmptyDataFramesdecoderEnforceMaxConsecutiveEmptyDataFramesdecoderEnforceMaxRstFramesPerWindowdecoupleCloseAndGoAwayencoderencoderEnforceMaxConcurrentStreamsencoderEnforceMaxQueuedControlFramesencoderEnforceMaxQueuedControlFramesencoderIgnoreMaxHeaderListSizeflushPrefaceframeListenerframeLoggergracefulShutdownTimeoutMillisheaderSensitivityDetectorinitialSettingsisAutoAckPingFrameisAutoAckSettingsFrameisServerisValidateHeadersmaxReservedStreamsmaxReservedStreamspromisedRequestVerifierpromisedRequestVerifierself

Field Detail

httpSchemeback to summary
private HttpScheme httpScheme

Constructor Detail

HttpToHttp2ConnectionHandlerBuilderback to summary
public HttpToHttp2ConnectionHandlerBuilder()

Method Detail

buildback to summary
public HttpToHttp2ConnectionHandler 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 HttpToHttp2ConnectionHandler 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 HttpToHttp2ConnectionHandlerBuilder 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 HttpToHttp2ConnectionHandlerBuilder 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 HttpToHttp2ConnectionHandlerBuilder 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:HttpToHttp2ConnectionHandlerBuilder

this.

Annotations
@Override
encoderEnforceMaxConcurrentStreamsback to summary
public HttpToHttp2ConnectionHandlerBuilder 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
flushPrefaceback to summary
public HttpToHttp2ConnectionHandlerBuilder 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:HttpToHttp2ConnectionHandlerBuilder

this.

Annotations
@Override
frameListenerback to summary
public HttpToHttp2ConnectionHandlerBuilder 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 HttpToHttp2ConnectionHandlerBuilder 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 HttpToHttp2ConnectionHandlerBuilder 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 HttpToHttp2ConnectionHandlerBuilder 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
httpSchemeback to summary
public HttpToHttp2ConnectionHandlerBuilder httpScheme(HttpScheme httpScheme)

Add scheme in Http2Headers if not already present.

Parameters
httpScheme:HttpScheme

HttpScheme type

Returns:HttpToHttp2ConnectionHandlerBuilder

this.

initialHuffmanDecodeCapacityback to summary
public HttpToHttp2ConnectionHandlerBuilder 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 HttpToHttp2ConnectionHandlerBuilder 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
serverback to summary
public HttpToHttp2ConnectionHandlerBuilder 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 HttpToHttp2ConnectionHandlerBuilder 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