GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Overview
  • Use
  • Tree
  • Deprecated
  • Index
  • Search
  • Help
  • io.netty.handler.codec.http2
  • HttpToHttp2ConnectionHandlerBuilder

This view

  • Original page
  • New address

GeezerVison is showing netty.io — HttpToHttp2ConnectionHandlerBuilder (Netty API Reference (4.1.141.Final))

Class HttpToHttp2ConnectionHandlerBuilder

java.lang.Object
io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler, HttpToHttp2ConnectionHandlerBuilder>
io.netty.handler.codec.http2.HttpToHttp2ConnectionHandlerBuilder

public final class HttpToHttp2ConnectionHandlerBuilder extends AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler, HttpToHttp2ConnectionHandlerBuilder>
Builder which builds HttpToHttp2ConnectionHandler objects.
  • Constructor Summary

    Constructors
    Constructor
    Description
    HttpToHttp2ConnectionHandlerBuilder()
     
  • Method Summary

    Modifier and Type
    Method
    Description
    HttpToHttp2ConnectionHandler
    build()
    Create a new Http2ConnectionHandler.
    protected HttpToHttp2ConnectionHandler
    build(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder, Http2Settings initialSettings)
    Implement this method to create a new Http2ConnectionHandler or its subtype instance.
    HttpToHttp2ConnectionHandlerBuilder
    codec(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder)
    Sets the Http2ConnectionDecoder and Http2ConnectionEncoder to use.
    HttpToHttp2ConnectionHandlerBuilder
    connection(Http2Connection connection)
    Sets the Http2Connection to use.
    HttpToHttp2ConnectionHandlerBuilder
    decoderEnforceMaxConsecutiveEmptyDataFrames(int maxConsecutiveEmptyFrames)
    Sets the maximum number of consecutive empty DATA frames (without end_of_stream flag) that are allowed before the connection is closed.
    HttpToHttp2ConnectionHandlerBuilder
    decoderEnforceMaxRstFramesPerWindow(int maxRstFramesPerWindow, int secondsPerWindow)
    Sets the maximum number RST frames that are allowed per window before the connection is closed.
    HttpToHttp2ConnectionHandlerBuilder
    decoupleCloseAndGoAway(boolean decoupleCloseAndGoAway)
    Determine if the ChannelOutboundInvoker.close() should be coupled with goaway and graceful close.
    HttpToHttp2ConnectionHandlerBuilder
    encoderEnforceMaxConcurrentStreams(boolean encoderEnforceMaxConcurrentStreams)
    Sets if the encoder should queue frames if the maximum number of concurrent streams would otherwise be exceeded.
    HttpToHttp2ConnectionHandlerBuilder
    encoderEnforceMaxRstFramesPerWindow(int maxRstFramesPerWindow, int secondsPerWindow)
    Sets the maximum number RST frames that are allowed per window before the connection is closed.
    HttpToHttp2ConnectionHandlerBuilder
    encoderIgnoreMaxHeaderListSize(boolean encoderIgnoreMaxHeaderListSize)
    Sets if the SETTINGS_MAX_HEADER_LIST_SIZE should be ignored when encoding headers.
    HttpToHttp2ConnectionHandlerBuilder
    flushPreface(boolean flushPreface)
    Determine if the Preface should be automatically flushed when the Channel becomes active or not.
    HttpToHttp2ConnectionHandlerBuilder
    frameListener(Http2FrameListener frameListener)
    Sets the listener of inbound frames.
    HttpToHttp2ConnectionHandlerBuilder
    frameLogger(Http2FrameLogger frameLogger)
    Sets the logger that is used for the encoder and decoder.
    HttpToHttp2ConnectionHandlerBuilder
    gracefulShutdownTimeoutMillis(long gracefulShutdownTimeoutMillis)
    Sets the graceful shutdown timeout of the Http2Connection in milliseconds.
    HttpToHttp2ConnectionHandlerBuilder
    headerSensitivityDetector(Http2HeadersEncoder.SensitivityDetector headerSensitivityDetector)
    Sets the Http2HeadersEncoder.SensitivityDetector to use.
    HttpToHttp2ConnectionHandlerBuilder
    httpScheme(HttpScheme httpScheme)
    Add scheme in Http2Headers if not already present.
    HttpToHttp2ConnectionHandlerBuilder
    initialHuffmanDecodeCapacity(int initialHuffmanDecodeCapacity)
    Deprecated.
    HttpToHttp2ConnectionHandlerBuilder
    initialSettings(Http2Settings settings)
    Sets the Http2Settings to use for the initial connection settings exchange.
    HttpToHttp2ConnectionHandlerBuilder
    server(boolean isServer)
    Sets if AbstractHttp2ConnectionHandlerBuilder.build() will to create a Http2Connection in server mode (true) or client mode (false).
    HttpToHttp2ConnectionHandlerBuilder
    validateHeaders(boolean validateHeaders)
    Sets if HTTP headers should be validated according to RFC 7540, 8.1.2.6.
    HttpToHttp2ConnectionHandlerBuilder
    validateRequiredPseudoHeaders(boolean validateRequiredPseudoHeaders)
    Sets if request and response HEADERS that omit a mandatory pseudo-header field are rejected, according to RFC 9113, 8.3.

    Methods inherited from class AbstractHttp2ConnectionHandlerBuilder

    autoAckPingFrame, autoAckSettingsFrame, connection, decoder, decoderEnforceMaxConsecutiveEmptyDataFrames, decoderEnforceMaxSmallContinuationFrames, decoderEnforceMaxSmallContinuationFrames, decoupleCloseAndGoAway, encoder, encoderEnforceMaxConcurrentStreams, encoderEnforceMaxQueuedControlFrames, encoderEnforceMaxQueuedControlFrames, flushPreface, frameListener, frameLogger, gracefulShutdownTimeoutMillis, headerSensitivityDetector, initialSettings, isAutoAckPingFrame, isAutoAckSettingsFrame, isServer, isValidateHeaders, isValidateRequiredPseudoHeaders, maxReservedStreams, maxReservedStreams, promisedRequestVerifier, promisedRequestVerifier, self
    Modifier and Type
    Method
    Description
    protected HttpToHttp2ConnectionHandlerBuilder
    autoAckPingFrame(boolean autoAckPingFrame)
    Determine if PING frame should automatically be acknowledged or not.
    protected HttpToHttp2ConnectionHandlerBuilder
    autoAckSettingsFrame(boolean autoAckSettings)
    Determine if settings frame should automatically be acknowledged and applied.
    protected Http2Connection
    connection()
    Returns the Http2Connection to use.
    protected Http2ConnectionDecoder
    decoder()
    Returns the Http2ConnectionDecoder to use.
    protected int
    decoderEnforceMaxConsecutiveEmptyDataFrames()
    Returns the maximum number of consecutive empty DATA frames (without end_of_stream flag) that are allowed before the connection is closed.
    protected int
    decoderEnforceMaxSmallContinuationFrames()
    Returns the maximum number of small CONTINUATION frames per HEADERS block that are allowed before the connection is closed.
    protected HttpToHttp2ConnectionHandlerBuilder
    decoderEnforceMaxSmallContinuationFrames(int maxSmallContinuationFrames)
    Returns the maximum number of small CONTINUATION frames per HEADERS block that are allowed before the connection is closed.
    protected boolean
    decoupleCloseAndGoAway()
    Determine if the ChannelOutboundInvoker.close() should be coupled with goaway and graceful close.
    protected Http2ConnectionEncoder
    encoder()
    Returns the Http2ConnectionEncoder to use.
    protected boolean
    encoderEnforceMaxConcurrentStreams()
    Returns if the encoder should queue frames if the maximum number of concurrent streams would otherwise be exceeded.
    protected int
    encoderEnforceMaxQueuedControlFrames()
    Returns the maximum number of queued control frames that are allowed before the connection is closed.
    protected HttpToHttp2ConnectionHandlerBuilder
    encoderEnforceMaxQueuedControlFrames(int maxQueuedControlFrames)
    Sets the maximum number of queued control frames that are allowed before the connection is closed.
    protected boolean
    flushPreface()
    Determine if the Preface should be automatically flushed when the Channel becomes active or not.
    protected Http2FrameListener
    frameListener()
    Returns the listener of inbound frames.
    protected Http2FrameLogger
    frameLogger()
    Returns the logger that is used for the encoder and decoder.
    protected long
    gracefulShutdownTimeoutMillis()
    Returns the graceful shutdown timeout of the Http2Connection in milliseconds.
    protected Http2HeadersEncoder.SensitivityDetector
    headerSensitivityDetector()
    Returns the Http2HeadersEncoder.SensitivityDetector to use.
    protected Http2Settings
    initialSettings()
    Sets the Http2Settings to use for the initial connection settings exchange.
    protected boolean
    isAutoAckPingFrame()
    Determine if the PING frames should be automatically acknowledged or not.
    protected boolean
    isAutoAckSettingsFrame()
    Determine if the SETTINGS frames should be automatically acknowledged and applied.
    protected boolean
    isServer()
    Returns if AbstractHttp2ConnectionHandlerBuilder.build() will to create a Http2Connection in server mode (true) or client mode (false).
    protected boolean
    isValidateHeaders()
    Returns if HTTP headers should be validated according to RFC 7540, 8.1.2.6.
    protected boolean
    isValidateRequiredPseudoHeaders()
    Returns if mandatory pseudo-header fields are validated according to RFC 9113, 8.3.
    protected int
    maxReservedStreams()
    Get the maximum number of streams which can be in the reserved state at any given time.
    protected HttpToHttp2ConnectionHandlerBuilder
    maxReservedStreams(int maxReservedStreams)
    Set the maximum number of streams which can be in the reserved state at any given time.
    protected Http2PromisedRequestVerifier
    promisedRequestVerifier()
    Get the Http2PromisedRequestVerifier to use.
    protected HttpToHttp2ConnectionHandlerBuilder
    promisedRequestVerifier(Http2PromisedRequestVerifier promisedRequestVerifier)
    Set the Http2PromisedRequestVerifier to use.
    protected final HttpToHttp2ConnectionHandlerBuilder
    self()
    Returns this.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • HttpToHttp2ConnectionHandlerBuilder

      public HttpToHttp2ConnectionHandlerBuilder()
  • Method Details

    • validateHeaders

      public HttpToHttp2ConnectionHandlerBuilder validateHeaders(boolean validateHeaders)
      Description copied from class: AbstractHttp2ConnectionHandlerBuilder
      Sets if HTTP headers should be validated according to RFC 7540, 8.1.2.6.
      Overrides:
      validateHeaders in class AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler, HttpToHttp2ConnectionHandlerBuilder>
    • validateRequiredPseudoHeaders

      public HttpToHttp2ConnectionHandlerBuilder validateRequiredPseudoHeaders(boolean validateRequiredPseudoHeaders)
      Description copied from class: AbstractHttp2ConnectionHandlerBuilder
      Sets if request and response HEADERS that omit a mandatory pseudo-header field are rejected, according to RFC 9113, 8.3. Disabled by default.
      Overrides:
      validateRequiredPseudoHeaders in class AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler, HttpToHttp2ConnectionHandlerBuilder>
    • initialSettings

      public HttpToHttp2ConnectionHandlerBuilder initialSettings(Http2Settings settings)
      Description copied from class: AbstractHttp2ConnectionHandlerBuilder
      Sets the Http2Settings to use for the initial connection settings exchange.
      Overrides:
      initialSettings in class AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler, HttpToHttp2ConnectionHandlerBuilder>
    • frameListener

      public HttpToHttp2ConnectionHandlerBuilder frameListener(Http2FrameListener frameListener)
      Description copied from class: AbstractHttp2ConnectionHandlerBuilder
      Sets the listener of inbound frames. This listener will only be set if the decoder's listener is null.
      Overrides:
      frameListener in class AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler, HttpToHttp2ConnectionHandlerBuilder>
    • gracefulShutdownTimeoutMillis

      public HttpToHttp2ConnectionHandlerBuilder gracefulShutdownTimeoutMillis(long gracefulShutdownTimeoutMillis)
      Description copied from class: AbstractHttp2ConnectionHandlerBuilder
      Sets the graceful shutdown timeout of the Http2Connection in milliseconds.
      Overrides:
      gracefulShutdownTimeoutMillis in class AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler, HttpToHttp2ConnectionHandlerBuilder>
    • server

      public HttpToHttp2ConnectionHandlerBuilder server(boolean isServer)
      Description copied from class: AbstractHttp2ConnectionHandlerBuilder
      Sets if AbstractHttp2ConnectionHandlerBuilder.build() will to create a Http2Connection in server mode (true) or client mode (false).
      Overrides:
      server in class AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler, HttpToHttp2ConnectionHandlerBuilder>
    • connection

      public HttpToHttp2ConnectionHandlerBuilder connection(Http2Connection connection)
      Description copied from class: AbstractHttp2ConnectionHandlerBuilder
      Sets the Http2Connection to use.
      Overrides:
      connection in class AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler, HttpToHttp2ConnectionHandlerBuilder>
    • codec

      public HttpToHttp2ConnectionHandlerBuilder codec(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder)
      Description copied from class: AbstractHttp2ConnectionHandlerBuilder
      Sets the Http2ConnectionDecoder and Http2ConnectionEncoder to use.
      Overrides:
      codec in class AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler, HttpToHttp2ConnectionHandlerBuilder>
    • frameLogger

      public HttpToHttp2ConnectionHandlerBuilder frameLogger(Http2FrameLogger frameLogger)
      Description copied from class: AbstractHttp2ConnectionHandlerBuilder
      Sets the logger that is used for the encoder and decoder.
      Overrides:
      frameLogger in class AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler, HttpToHttp2ConnectionHandlerBuilder>
    • encoderEnforceMaxConcurrentStreams

      public HttpToHttp2ConnectionHandlerBuilder encoderEnforceMaxConcurrentStreams(boolean encoderEnforceMaxConcurrentStreams)
      Description copied from class: AbstractHttp2ConnectionHandlerBuilder
      Sets if the encoder should queue frames if the maximum number of concurrent streams would otherwise be exceeded.
      Overrides:
      encoderEnforceMaxConcurrentStreams in class AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler, HttpToHttp2ConnectionHandlerBuilder>
    • headerSensitivityDetector

      public HttpToHttp2ConnectionHandlerBuilder headerSensitivityDetector(Http2HeadersEncoder.SensitivityDetector headerSensitivityDetector)
      Description copied from class: AbstractHttp2ConnectionHandlerBuilder
      Sets the Http2HeadersEncoder.SensitivityDetector to use.
      Overrides:
      headerSensitivityDetector in class AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler, HttpToHttp2ConnectionHandlerBuilder>
    • encoderIgnoreMaxHeaderListSize

      public HttpToHttp2ConnectionHandlerBuilder encoderIgnoreMaxHeaderListSize(boolean encoderIgnoreMaxHeaderListSize)
      Description copied from class: AbstractHttp2ConnectionHandlerBuilder
      Sets if the SETTINGS_MAX_HEADER_LIST_SIZE should be ignored when encoding headers.
      Overrides:
      encoderIgnoreMaxHeaderListSize in class AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler, HttpToHttp2ConnectionHandlerBuilder>
      Parameters:
      encoderIgnoreMaxHeaderListSize - true to ignore SETTINGS_MAX_HEADER_LIST_SIZE.
      Returns:
      this.
    • decoderEnforceMaxConsecutiveEmptyDataFrames

      public HttpToHttp2ConnectionHandlerBuilder decoderEnforceMaxConsecutiveEmptyDataFrames(int maxConsecutiveEmptyFrames)
      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.
      Overrides:
      decoderEnforceMaxConsecutiveEmptyDataFrames in class AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler, HttpToHttp2ConnectionHandlerBuilder>
    • decoderEnforceMaxRstFramesPerWindow

      public HttpToHttp2ConnectionHandlerBuilder decoderEnforceMaxRstFramesPerWindow(int maxRstFramesPerWindow, int secondsPerWindow)
      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.
      Overrides:
      decoderEnforceMaxRstFramesPerWindow in class AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler, HttpToHttp2ConnectionHandlerBuilder>
    • encoderEnforceMaxRstFramesPerWindow

      public HttpToHttp2ConnectionHandlerBuilder encoderEnforceMaxRstFramesPerWindow(int maxRstFramesPerWindow, int secondsPerWindow)
      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 that will trigger us to generate a flood of RST frames and so use up a lot of CPU. 0 for any of the parameters means no protection should be applied.
      Overrides:
      encoderEnforceMaxRstFramesPerWindow in class AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler, HttpToHttp2ConnectionHandlerBuilder>
    • initialHuffmanDecodeCapacity

      @Deprecated public HttpToHttp2ConnectionHandlerBuilder initialHuffmanDecodeCapacity(int initialHuffmanDecodeCapacity)
      Deprecated.
      Description copied from class: AbstractHttp2ConnectionHandlerBuilder
      Does nothing, do not call.
      Overrides:
      initialHuffmanDecodeCapacity in class AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler, HttpToHttp2ConnectionHandlerBuilder>
    • decoupleCloseAndGoAway

      public HttpToHttp2ConnectionHandlerBuilder decoupleCloseAndGoAway(boolean decoupleCloseAndGoAway)
      Description copied from class: AbstractHttp2ConnectionHandlerBuilder
      Determine if the ChannelOutboundInvoker.close() should be coupled with goaway and graceful close.
      Overrides:
      decoupleCloseAndGoAway in class AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler, HttpToHttp2ConnectionHandlerBuilder>
      Parameters:
      decoupleCloseAndGoAway - true to make ChannelOutboundInvoker.close() directly close the underlying transport, and not attempt graceful closure via GOAWAY.
      Returns:
      this.
    • flushPreface

      public HttpToHttp2ConnectionHandlerBuilder flushPreface(boolean flushPreface)
      Description copied from class: AbstractHttp2ConnectionHandlerBuilder
      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.

      Overrides:
      flushPreface in class AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler, HttpToHttp2ConnectionHandlerBuilder>
      Parameters:
      flushPreface - true to automatically flush, false otherwise.
      Returns:
      this.
      See Also:
      • HTTP/2 Connection Preface
    • httpScheme

      public HttpToHttp2ConnectionHandlerBuilder httpScheme(HttpScheme httpScheme)
      Add scheme in Http2Headers if not already present.
      Parameters:
      httpScheme - HttpScheme type
      Returns:
      this.
    • build

      public HttpToHttp2ConnectionHandler build()
      Description copied from class: AbstractHttp2ConnectionHandlerBuilder
      Create a new Http2ConnectionHandler.
      Overrides:
      build in class AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler, HttpToHttp2ConnectionHandlerBuilder>
    • build

      protected HttpToHttp2ConnectionHandler build(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder, Http2Settings initialSettings)
      Description copied from class: AbstractHttp2ConnectionHandlerBuilder
      Implement this method to create a new Http2ConnectionHandler 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 decoder
      • AbstractHttp2ConnectionHandlerBuilder.gracefulShutdownTimeoutMillis(long) will always be set
      Specified by:
      build in class AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler, HttpToHttp2ConnectionHandlerBuilder>
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.