@UnstableApi public final class Http2ConnectionHandlerBuilder extends AbstractHttp2ConnectionHandlerBuilder<Http2ConnectionHandler,Http2ConnectionHandlerBuilder>
Http2ConnectionHandler objects.| Constructor and Description |
|---|
Http2ConnectionHandlerBuilder() |
| Modifier and Type | Method and Description |
|---|---|
Http2ConnectionHandler |
build()
Create a new
Http2ConnectionHandler. |
protected Http2ConnectionHandler |
build(Http2ConnectionDecoder decoder,
Http2ConnectionEncoder encoder,
Http2Settings initialSettings)
Implement this method to create a new
Http2ConnectionHandler or its subtype instance. |
Http2ConnectionHandlerBuilder |
codec(Http2ConnectionDecoder decoder,
Http2ConnectionEncoder encoder)
Sets the
Http2ConnectionDecoder and Http2ConnectionEncoder to use. |
Http2ConnectionHandlerBuilder |
connection(Http2Connection connection)
Sets the
Http2Connection to use. |
Http2ConnectionHandlerBuilder |
encoderEnforceMaxConcurrentStreams(boolean encoderEnforceMaxConcurrentStreams)
Sets if the encoder should queue frames if the maximum number of concurrent streams
would otherwise be exceeded.
|
Http2ConnectionHandlerBuilder |
encoderIgnoreMaxHeaderListSize(boolean encoderIgnoreMaxHeaderListSize)
Sets if the SETTINGS_MAX_HEADER_LIST_SIZE
should be ignored when encoding headers.
|
Http2ConnectionHandlerBuilder |
frameListener(Http2FrameListener frameListener)
Sets the listener of inbound frames.
|
Http2ConnectionHandlerBuilder |
frameLogger(Http2FrameLogger frameLogger)
Sets the logger that is used for the encoder and decoder.
|
Http2ConnectionHandlerBuilder |
gracefulShutdownTimeoutMillis(long gracefulShutdownTimeoutMillis)
Sets the graceful shutdown timeout of the
Http2Connection in milliseconds. |
Http2ConnectionHandlerBuilder |
headerSensitivityDetector(Http2HeadersEncoder.SensitivityDetector headerSensitivityDetector)
Sets the
Http2HeadersEncoder.SensitivityDetector to use. |
Http2ConnectionHandlerBuilder |
initialSettings(Http2Settings settings)
Sets the
Http2Settings to use for the initial connection settings exchange. |
Http2ConnectionHandlerBuilder |
maxReservedStreams(int maxReservedStreams)
Set the maximum number of streams which can be in the reserved state at any given time.
|
Http2ConnectionHandlerBuilder |
server(boolean isServer)
Sets if
AbstractHttp2ConnectionHandlerBuilder.build() will to create a Http2Connection in server mode (true)
or client mode (false). |
Http2ConnectionHandlerBuilder |
validateHeaders(boolean validateHeaders)
Sets if HTTP headers should be validated according to
RFC 7540, 8.1.2.6.
|
connection, decoder, encoder, encoderEnforceMaxConcurrentStreams, frameListener, frameLogger, gracefulShutdownTimeoutMillis, headerSensitivityDetector, initialSettings, isServer, isValidateHeaders, maxReservedStreams, selfpublic Http2ConnectionHandlerBuilder validateHeaders(boolean validateHeaders)
AbstractHttp2ConnectionHandlerBuilderpublic Http2ConnectionHandlerBuilder initialSettings(Http2Settings settings)
AbstractHttp2ConnectionHandlerBuilderHttp2Settings to use for the initial connection settings exchange.public Http2ConnectionHandlerBuilder frameListener(Http2FrameListener frameListener)
AbstractHttp2ConnectionHandlerBuildernull.public Http2ConnectionHandlerBuilder gracefulShutdownTimeoutMillis(long gracefulShutdownTimeoutMillis)
AbstractHttp2ConnectionHandlerBuilderHttp2Connection in milliseconds.public Http2ConnectionHandlerBuilder server(boolean isServer)
AbstractHttp2ConnectionHandlerBuilderAbstractHttp2ConnectionHandlerBuilder.build() will to create a Http2Connection in server mode (true)
or client mode (false).server in class AbstractHttp2ConnectionHandlerBuilder<Http2ConnectionHandler,Http2ConnectionHandlerBuilder>public Http2ConnectionHandlerBuilder connection(Http2Connection connection)
AbstractHttp2ConnectionHandlerBuilderHttp2Connection to use.public Http2ConnectionHandlerBuilder maxReservedStreams(int maxReservedStreams)
AbstractHttp2ConnectionHandlerBuilderpublic Http2ConnectionHandlerBuilder codec(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder)
AbstractHttp2ConnectionHandlerBuilderHttp2ConnectionDecoder and Http2ConnectionEncoder to use.codec in class AbstractHttp2ConnectionHandlerBuilder<Http2ConnectionHandler,Http2ConnectionHandlerBuilder>public Http2ConnectionHandlerBuilder frameLogger(Http2FrameLogger frameLogger)
AbstractHttp2ConnectionHandlerBuilderpublic Http2ConnectionHandlerBuilder encoderEnforceMaxConcurrentStreams(boolean encoderEnforceMaxConcurrentStreams)
AbstractHttp2ConnectionHandlerBuilderpublic Http2ConnectionHandlerBuilder encoderIgnoreMaxHeaderListSize(boolean encoderIgnoreMaxHeaderListSize)
AbstractHttp2ConnectionHandlerBuilderencoderIgnoreMaxHeaderListSize in class AbstractHttp2ConnectionHandlerBuilder<Http2ConnectionHandler,Http2ConnectionHandlerBuilder>encoderIgnoreMaxHeaderListSize - true to ignore
SETTINGS_MAX_HEADER_LIST_SIZE.public Http2ConnectionHandlerBuilder headerSensitivityDetector(Http2HeadersEncoder.SensitivityDetector headerSensitivityDetector)
AbstractHttp2ConnectionHandlerBuilderHttp2HeadersEncoder.SensitivityDetector to use.public Http2ConnectionHandler build()
AbstractHttp2ConnectionHandlerBuilderHttp2ConnectionHandler.build in class AbstractHttp2ConnectionHandlerBuilder<Http2ConnectionHandler,Http2ConnectionHandlerBuilder>protected Http2ConnectionHandler build(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder, Http2Settings initialSettings)
AbstractHttp2ConnectionHandlerBuilderHttp2ConnectionHandler or its subtype instance.
The return of this method will be subject to the following:
AbstractHttp2ConnectionHandlerBuilder.frameListener(Http2FrameListener) will be set if not already set in the decoderAbstractHttp2ConnectionHandlerBuilder.gracefulShutdownTimeoutMillis(long) will always be setbuild in class AbstractHttp2ConnectionHandlerBuilder<Http2ConnectionHandler,Http2ConnectionHandlerBuilder>Copyright © 2008–2017 The Netty Project. All rights reserved.