Package io.netty.handler.codec.http2
Class Http2MultiplexCodecBuilder
- java.lang.Object
-
- io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder<Http2MultiplexCodec,Http2MultiplexCodecBuilder>
-
- io.netty.handler.codec.http2.Http2MultiplexCodecBuilder
-
@Deprecated public class Http2MultiplexCodecBuilder extends AbstractHttp2ConnectionHandlerBuilder<Http2MultiplexCodec,Http2MultiplexCodecBuilder>
Deprecated.useHttp2FrameCodecBuilder
together withHttp2MultiplexHandler
.A builder forHttp2MultiplexCodec
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Http2MultiplexCodecBuilder
autoAckPingFrame(boolean autoAckPingFrame)
Deprecated.Determine if PING frame should automatically be acknowledged or not.Http2MultiplexCodecBuilder
autoAckSettingsFrame(boolean autoAckSettings)
Deprecated.Determine if settings frame should automatically be acknowledged and applied.Http2MultiplexCodec
build()
Deprecated.Create a newHttp2ConnectionHandler
.protected Http2MultiplexCodec
build(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder, Http2Settings initialSettings)
Deprecated.Implement this method to create a newHttp2ConnectionHandler
or its subtype instance.int
decoderEnforceMaxConsecutiveEmptyDataFrames()
Deprecated.Returns the maximum number of consecutive empty DATA frames (without end_of_stream flag) that are allowed before the connection is closed.Http2MultiplexCodecBuilder
decoderEnforceMaxConsecutiveEmptyDataFrames(int maxConsecutiveEmptyFrames)
Deprecated.Sets the maximum number of consecutive empty DATA frames (without end_of_stream flag) that are allowed before the connection is closed.Http2MultiplexCodecBuilder
decoderEnforceMaxRstFramesPerWindow(int maxRstFramesPerWindow, int secondsPerWindow)
Deprecated.Sets the maximum number RST frames that are allowed per window before the connection is closed.Http2MultiplexCodecBuilder
decoupleCloseAndGoAway(boolean decoupleCloseAndGoAway)
Deprecated.Determine if theChannel.close()
should be coupled with goaway and graceful close.boolean
encoderEnforceMaxConcurrentStreams()
Deprecated.Returns if the encoder should queue frames if the maximum number of concurrent streams would otherwise be exceeded.Http2MultiplexCodecBuilder
encoderEnforceMaxConcurrentStreams(boolean encoderEnforceMaxConcurrentStreams)
Deprecated.Sets if the encoder should queue frames if the maximum number of concurrent streams would otherwise be exceeded.int
encoderEnforceMaxQueuedControlFrames()
Deprecated.Returns the maximum number of queued control frames that are allowed before the connection is closed.Http2MultiplexCodecBuilder
encoderEnforceMaxQueuedControlFrames(int maxQueuedControlFrames)
Deprecated.Sets the maximum number of queued control frames that are allowed before the connection is closed.Http2MultiplexCodecBuilder
encoderIgnoreMaxHeaderListSize(boolean ignoreMaxHeaderListSize)
Deprecated.Sets if the SETTINGS_MAX_HEADER_LIST_SIZE should be ignored when encoding headers.Http2MultiplexCodecBuilder
flushPreface(boolean flushPreface)
Deprecated.static Http2MultiplexCodecBuilder
forClient(ChannelHandler childHandler)
Deprecated.Creates a builder for an HTTP/2 client.static Http2MultiplexCodecBuilder
forServer(ChannelHandler childHandler)
Deprecated.Creates a builder for an HTTP/2 server.Http2FrameLogger
frameLogger()
Deprecated.Returns the logger that is used for the encoder and decoder.Http2MultiplexCodecBuilder
frameLogger(Http2FrameLogger frameLogger)
Deprecated.Sets the logger that is used for the encoder and decoder.long
gracefulShutdownTimeoutMillis()
Deprecated.Returns the graceful shutdown timeout of theHttp2Connection
in milliseconds.Http2MultiplexCodecBuilder
gracefulShutdownTimeoutMillis(long gracefulShutdownTimeoutMillis)
Deprecated.Sets the graceful shutdown timeout of theHttp2Connection
in milliseconds.Http2HeadersEncoder.SensitivityDetector
headerSensitivityDetector()
Deprecated.Returns theHttp2HeadersEncoder.SensitivityDetector
to use.Http2MultiplexCodecBuilder
headerSensitivityDetector(Http2HeadersEncoder.SensitivityDetector headerSensitivityDetector)
Deprecated.Sets theHttp2HeadersEncoder.SensitivityDetector
to use.Http2MultiplexCodecBuilder
initialHuffmanDecodeCapacity(int initialHuffmanDecodeCapacity)
Deprecated.Http2Settings
initialSettings()
Deprecated.Sets theHttp2Settings
to use for the initial connection settings exchange.Http2MultiplexCodecBuilder
initialSettings(Http2Settings settings)
Deprecated.Sets theHttp2Settings
to use for the initial connection settings exchange.boolean
isServer()
Deprecated.Returns ifAbstractHttp2ConnectionHandlerBuilder.build()
will to create aHttp2Connection
in server mode (true
) or client mode (false
).boolean
isValidateHeaders()
Deprecated.Returns if HTTP headers should be validated according to RFC 7540, 8.1.2.6.int
maxReservedStreams()
Deprecated.Get the maximum number of streams which can be in the reserved state at any given time.Http2MultiplexCodecBuilder
maxReservedStreams(int maxReservedStreams)
Deprecated.Set the maximum number of streams which can be in the reserved state at any given time.Http2MultiplexCodecBuilder
validateHeaders(boolean validateHeaders)
Deprecated.Sets if HTTP headers should be validated according to RFC 7540, 8.1.2.6.Http2MultiplexCodecBuilder
withUpgradeStreamHandler(ChannelHandler upgradeStreamHandler)
Deprecated.-
Methods inherited from class io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder
codec, connection, connection, decoder, decoupleCloseAndGoAway, encoder, flushPreface, frameListener, frameListener, isAutoAckPingFrame, isAutoAckSettingsFrame, promisedRequestVerifier, promisedRequestVerifier, self, server
-
-
-
-
Method Detail
-
forClient
public static Http2MultiplexCodecBuilder forClient(ChannelHandler childHandler)
Deprecated.Creates a builder for an HTTP/2 client.- Parameters:
childHandler
- the handler added to channels for remotely-created streams. It must beChannelHandler.Sharable
.
-
forServer
public static Http2MultiplexCodecBuilder forServer(ChannelHandler childHandler)
Deprecated.Creates a builder for an HTTP/2 server.- Parameters:
childHandler
- the handler added to channels for remotely-created streams. It must beChannelHandler.Sharable
.
-
withUpgradeStreamHandler
public Http2MultiplexCodecBuilder withUpgradeStreamHandler(ChannelHandler upgradeStreamHandler)
Deprecated.
-
initialSettings
public Http2Settings initialSettings()
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Sets theHttp2Settings
to use for the initial connection settings exchange.- Overrides:
initialSettings
in classAbstractHttp2ConnectionHandlerBuilder<Http2MultiplexCodec,Http2MultiplexCodecBuilder>
-
initialSettings
public Http2MultiplexCodecBuilder initialSettings(Http2Settings settings)
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Sets theHttp2Settings
to use for the initial connection settings exchange.- Overrides:
initialSettings
in classAbstractHttp2ConnectionHandlerBuilder<Http2MultiplexCodec,Http2MultiplexCodecBuilder>
-
gracefulShutdownTimeoutMillis
public long gracefulShutdownTimeoutMillis()
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Returns the graceful shutdown timeout of theHttp2Connection
in milliseconds. Returns -1 if the timeout is indefinite.
-
gracefulShutdownTimeoutMillis
public Http2MultiplexCodecBuilder gracefulShutdownTimeoutMillis(long gracefulShutdownTimeoutMillis)
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Sets the graceful shutdown timeout of theHttp2Connection
in milliseconds.
-
isServer
public boolean isServer()
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Returns ifAbstractHttp2ConnectionHandlerBuilder.build()
will to create aHttp2Connection
in server mode (true
) or client mode (false
).- Overrides:
isServer
in classAbstractHttp2ConnectionHandlerBuilder<Http2MultiplexCodec,Http2MultiplexCodecBuilder>
-
maxReservedStreams
public int maxReservedStreams()
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Get the maximum number of streams which can be in the reserved state at any given time.By default this value will be ignored on the server for local endpoint. This is because the RFC provides no way to explicitly communicate a limit to how many states can be in the reserved state, and instead relies on the peer to send RST_STREAM frames when they will be rejected.
- Overrides:
maxReservedStreams
in classAbstractHttp2ConnectionHandlerBuilder<Http2MultiplexCodec,Http2MultiplexCodecBuilder>
-
maxReservedStreams
public Http2MultiplexCodecBuilder maxReservedStreams(int maxReservedStreams)
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Set the maximum number of streams which can be in the reserved state at any given time.- Overrides:
maxReservedStreams
in classAbstractHttp2ConnectionHandlerBuilder<Http2MultiplexCodec,Http2MultiplexCodecBuilder>
-
isValidateHeaders
public boolean isValidateHeaders()
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Returns if HTTP headers should be validated according to RFC 7540, 8.1.2.6.- Overrides:
isValidateHeaders
in classAbstractHttp2ConnectionHandlerBuilder<Http2MultiplexCodec,Http2MultiplexCodecBuilder>
-
validateHeaders
public Http2MultiplexCodecBuilder validateHeaders(boolean validateHeaders)
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Sets if HTTP headers should be validated according to RFC 7540, 8.1.2.6.- Overrides:
validateHeaders
in classAbstractHttp2ConnectionHandlerBuilder<Http2MultiplexCodec,Http2MultiplexCodecBuilder>
-
frameLogger
public Http2FrameLogger frameLogger()
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Returns the logger that is used for the encoder and decoder.- Overrides:
frameLogger
in classAbstractHttp2ConnectionHandlerBuilder<Http2MultiplexCodec,Http2MultiplexCodecBuilder>
- Returns:
Http2FrameLogger
if set, ornull
if not set.
-
frameLogger
public Http2MultiplexCodecBuilder frameLogger(Http2FrameLogger frameLogger)
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Sets the logger that is used for the encoder and decoder.- Overrides:
frameLogger
in classAbstractHttp2ConnectionHandlerBuilder<Http2MultiplexCodec,Http2MultiplexCodecBuilder>
-
encoderEnforceMaxConcurrentStreams
public boolean encoderEnforceMaxConcurrentStreams()
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Returns if the encoder should queue frames if the maximum number of concurrent streams would otherwise be exceeded.
-
encoderEnforceMaxConcurrentStreams
public Http2MultiplexCodecBuilder encoderEnforceMaxConcurrentStreams(boolean encoderEnforceMaxConcurrentStreams)
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Sets if the encoder should queue frames if the maximum number of concurrent streams would otherwise be exceeded.
-
encoderEnforceMaxQueuedControlFrames
public int encoderEnforceMaxQueuedControlFrames()
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Returns the maximum number of queued control frames that are allowed before the connection is closed. This allows to protected against various attacks that can lead to high CPU / memory usage if the remote-peer floods us with frames that would have us produce control frames, but stops to read from the underlying socket.0
means no protection is in place.
-
encoderEnforceMaxQueuedControlFrames
public Http2MultiplexCodecBuilder encoderEnforceMaxQueuedControlFrames(int maxQueuedControlFrames)
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Sets the maximum number of queued control frames that are allowed before the connection is closed. This allows to protected against various attacks that can lead to high CPU / memory usage if the remote-peer floods us with frames that would have us produce control frames, but stops to read from the underlying socket.0
means no protection should be applied.
-
headerSensitivityDetector
public Http2HeadersEncoder.SensitivityDetector headerSensitivityDetector()
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Returns theHttp2HeadersEncoder.SensitivityDetector
to use.
-
headerSensitivityDetector
public Http2MultiplexCodecBuilder headerSensitivityDetector(Http2HeadersEncoder.SensitivityDetector headerSensitivityDetector)
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Sets theHttp2HeadersEncoder.SensitivityDetector
to use.
-
encoderIgnoreMaxHeaderListSize
public Http2MultiplexCodecBuilder encoderIgnoreMaxHeaderListSize(boolean ignoreMaxHeaderListSize)
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Sets if the SETTINGS_MAX_HEADER_LIST_SIZE should be ignored when encoding headers.- Overrides:
encoderIgnoreMaxHeaderListSize
in classAbstractHttp2ConnectionHandlerBuilder<Http2MultiplexCodec,Http2MultiplexCodecBuilder>
- Parameters:
ignoreMaxHeaderListSize
-true
to ignore SETTINGS_MAX_HEADER_LIST_SIZE.- Returns:
- this.
-
initialHuffmanDecodeCapacity
@Deprecated public Http2MultiplexCodecBuilder initialHuffmanDecodeCapacity(int initialHuffmanDecodeCapacity)
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Does nothing, do not call.
-
autoAckSettingsFrame
public Http2MultiplexCodecBuilder autoAckSettingsFrame(boolean autoAckSettings)
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Determine if settings frame should automatically be acknowledged and applied.- Overrides:
autoAckSettingsFrame
in classAbstractHttp2ConnectionHandlerBuilder<Http2MultiplexCodec,Http2MultiplexCodecBuilder>
- Returns:
- this.
-
autoAckPingFrame
public Http2MultiplexCodecBuilder autoAckPingFrame(boolean autoAckPingFrame)
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Determine if PING frame should automatically be acknowledged or not.- Overrides:
autoAckPingFrame
in classAbstractHttp2ConnectionHandlerBuilder<Http2MultiplexCodec,Http2MultiplexCodecBuilder>
- Returns:
- this.
-
decoupleCloseAndGoAway
public Http2MultiplexCodecBuilder decoupleCloseAndGoAway(boolean decoupleCloseAndGoAway)
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Determine if theChannel.close()
should be coupled with goaway and graceful close.- Overrides:
decoupleCloseAndGoAway
in classAbstractHttp2ConnectionHandlerBuilder<Http2MultiplexCodec,Http2MultiplexCodecBuilder>
- Parameters:
decoupleCloseAndGoAway
-true
to makeChannel.close()
directly close the underlying transport, and not attempt graceful closure via GOAWAY.- Returns:
this
.
-
flushPreface
public Http2MultiplexCodecBuilder flushPreface(boolean flushPreface)
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Determine if the Preface should be automatically flushed when theChannel
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.
- Overrides:
flushPreface
in classAbstractHttp2ConnectionHandlerBuilder<Http2MultiplexCodec,Http2MultiplexCodecBuilder>
- Parameters:
flushPreface
-true
to automatically flush,false otherwise
.- Returns:
this
.- See Also:
- HTTP/2 Connection Preface
-
decoderEnforceMaxConsecutiveEmptyDataFrames
public int decoderEnforceMaxConsecutiveEmptyDataFrames()
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Returns the maximum number of consecutive empty DATA frames (without end_of_stream flag) that are allowed before the connection is closed. This allows to protect against the remote peer flooding us with such frames and so use up a lot of CPU. There is no valid use-case for empty DATA frames without end_of_stream flag.0
means no protection is in place.
-
decoderEnforceMaxConsecutiveEmptyDataFrames
public Http2MultiplexCodecBuilder decoderEnforceMaxConsecutiveEmptyDataFrames(int maxConsecutiveEmptyFrames)
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Sets the maximum number of consecutive empty DATA frames (without end_of_stream flag) that are allowed before the connection is closed. This allows to protect against the remote peer flooding us with such frames and so use up a lot of CPU. There is no valid use-case for empty DATA frames without end_of_stream flag.0
means no protection should be applied.
-
decoderEnforceMaxRstFramesPerWindow
public Http2MultiplexCodecBuilder decoderEnforceMaxRstFramesPerWindow(int maxRstFramesPerWindow, int secondsPerWindow)
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Sets the maximum number RST frames that are allowed per window before the connection is closed. This allows to protect against the remote peer flooding us with such frames and so use up a lot of CPU.0
for any of the parameters means no protection should be applied.
-
build
public Http2MultiplexCodec build()
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Create a newHttp2ConnectionHandler
.- Overrides:
build
in classAbstractHttp2ConnectionHandlerBuilder<Http2MultiplexCodec,Http2MultiplexCodecBuilder>
-
build
protected Http2MultiplexCodec build(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder, Http2Settings initialSettings)
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilder
Implement this method to create a newHttp2ConnectionHandler
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 set
- Specified by:
build
in classAbstractHttp2ConnectionHandlerBuilder<Http2MultiplexCodec,Http2MultiplexCodecBuilder>
-
-