Interface Http2Config

All Superinterfaces:
NamedService, ProtocolConfig, Prototype.Api
All Known Implementing Classes:
Http2Config.BuilderBase.Http2ConfigImpl

public interface Http2Config extends Prototype.Api
HTTP/2 server configuration.
See Also:
  • Method Details

    • builder

      static Http2Config.Builder builder()
      Create a new fluent API builder to customize configuration.
      Returns:
      a new builder
    • builder

      static Http2Config.Builder builder(Http2Config instance)
      Create a new fluent API builder from an existing instance.
      Parameters:
      instance - an existing instance used as a base for the builder
      Returns:
      a builder based on an instance
    • create

      static Http2Config create(Config config)
      Create a new instance from configuration.
      Parameters:
      config - used to configure the new instance
      Returns:
      a new instance configured from configuration
    • create

      static Http2Config create()
      Create a new instance with default values.
      Returns:
      a new instance
    • maxFrameSize

      int maxFrameSize()
      The size of the largest frame payload that the sender is willing to receive in bytes. Default value is 16384 and maximum value is 224-1 = 16777215 bytes. See RFC 9113 section 6.5.2 for details.
      Returns:
      maximal frame size
    • maxHeaderListSize

      long maxHeaderListSize()
      The maximum field section size that the sender is prepared to accept in bytes. See RFC 9113 section 6.5.2 for details. Default is 8192.
      Returns:
      maximal header list size in bytes
    • maxConcurrentStreams

      long maxConcurrentStreams()
      Maximum number of concurrent streams that the server will allow. Defaults to 8192. This limit is directional: it applies to the number of streams that the sender permits the receiver to create. It is recommended that this value be no smaller than 100 to not unnecessarily limit parallelism See RFC 9113 section 6.5.2 for details.
      Returns:
      maximal number of concurrent streams
    • initialWindowSize

      int initialWindowSize()
      This setting indicates the sender's maximum window size in bytes for stream-level flow control. Default and maximum value is 231-1 = 2147483647 bytes. This setting affects the window size of HTTP/2 connection. Any value greater than 2147483647 causes an error. Any value smaller than initial window size causes an error. See RFC 9113 section 6.9.1 for details.
      Returns:
      maximum window size in bytes
    • flowControlTimeout

      Duration flowControlTimeout()
      Outbound flow control blocking timeout configured as Duration or text in ISO-8601 format. Blocking timeout defines an interval to wait for the outbound window size changes(incoming window updates) before the next blocking iteration. Default value is PT0.1S.
      ISO_8601 format examples:
      PT0.1S100 milliseconds
      PT0.5S500 milliseconds
      PT2S2 seconds
      Returns:
      duration
      See Also:
    • sendErrorDetails

      boolean sendErrorDetails()
      Whether to send error message over HTTP to client. Defaults to false, as exception message may contain internal information that could be used as an attack vector. Use with care and in cases where both server and clients are under your full control (such as for testing).
      Returns:
      whether to send error messages over the network
    • rapidResetCheckPeriod

      Duration rapidResetCheckPeriod()
      Period for counting rapid resets(stream RST sent by client before any data have been sent by server). Default value is PT10S.
      Returns:
      duration
      See Also:
    • maxRapidResets

      int maxRapidResets()
      Maximum number of rapid resets(stream RST sent by client before any data have been sent by server). When reached within rapidResetCheckPeriod(), GOAWAY is sent to client and connection is closed. Default value is 100.
      Returns:
      maximum number of rapid resets
      See Also:
    • maxEmptyFrames

      int maxEmptyFrames()
      Maximum number of consecutive empty frames allowed on connection.
      Returns:
      max number of consecutive empty frames
    • validatePath

      boolean validatePath()
      If set to false, any path is accepted (even containing illegal characters).
      Returns:
      whether to validate path
    • requestedUriDiscovery

      RequestedUriDiscoveryContext requestedUriDiscovery()
      Requested URI discovery settings.
      Returns:
      settings for computing the requested URI
    • type

      default String type()
      Protocol configuration type.
      Specified by:
      type in interface NamedService
      Returns:
      type of this configuration