Class Http2ServerConfig

java.lang.Object
io.vertx.core.http.Http2ServerConfig

@Unstable public class Http2ServerConfig extends Object
HTTP/2 server configuration.
Author:
Julien Viet
  • Constructor Details

    • Http2ServerConfig

      public Http2ServerConfig()
    • Http2ServerConfig

      public Http2ServerConfig(Http2ServerConfig other)
  • Method Details

    • getRstFloodMaxRstFramePerWindow

      public int getRstFloodMaxRstFramePerWindow()
      Returns:
      the max number of RST frame allowed per time window
    • setRstFloodMaxRstFramePerWindow

      public Http2ServerConfig setRstFloodMaxRstFramePerWindow(int rstFloodMaxRstFramePerWindow)
      Set the max number of RST frame allowed per time window, this is used to prevent HTTP/2 RST frame flood DDOS attacks. The default value is HttpServerOptions.DEFAULT_HTTP2_RST_FLOOD_MAX_RST_FRAME_PER_WINDOW, setting zero or a negative value, disables flood protection.
      Parameters:
      rstFloodMaxRstFramePerWindow - the new maximum
      Returns:
      a reference to this, so the API can be used fluently
    • getRstFloodWindowDuration

      public Duration getRstFloodWindowDuration()
      Returns:
      the duration of the time window when checking the max number of RST frames.
    • setRstFloodWindowDuration

      public Http2ServerConfig setRstFloodWindowDuration(Duration rstFloodWindowDuration)
      Set the duration of the time window when checking the max number of RST frames, this is used to prevent HTTP/2 RST frame flood DDOS attacks. The default value is HttpServerOptions.DEFAULT_HTTP2_RST_FLOOD_WINDOW_DURATION, setting zero or a negative value, disables flood protection.
      Parameters:
      rstFloodWindowDuration - the new duration
      Returns:
      a reference to this, so the API can be used fluently
    • getMaxSmallContinuationFrames

      public int getMaxSmallContinuationFrames()
      Returns:
      the max number of small continuation frame allowed
    • setMaxSmallContinuationFrames

      public Http2ServerConfig setMaxSmallContinuationFrames(int maxSmallContinuationFrames)
      Set the maximum number of small continuation frames allowed, this is used to prevent flood DoS attack via zero-byte continuation frames. The default value is HttpServerOptions.DEFAULT_HTTP2_MAX_SMALL_CONTINUATION_FRAMES.
      Parameters:
      maxSmallContinuationFrames - the max number of small continuation frame allowed
      Returns:
      a reference to this, so the API can be used fluently
    • getConnectionWindowSize

      public int getConnectionWindowSize()
      Returns:
      the default HTTP/2 connection window size
    • setConnectionWindowSize

      public Http2ServerConfig setConnectionWindowSize(int connectionWindowSize)
      Set the default HTTP/2 connection window size. It overrides the initial window size set by Http2Settings.getInitialWindowSize(), so the connection window size is greater than for its streams, in order the data throughput.

      A value of -1 reuses the initial window size setting.

      Parameters:
      connectionWindowSize - the window size applied to the connection
      Returns:
      a reference to this, so the API can be used fluently
    • getMultiplexImplementation

      public boolean getMultiplexImplementation()
      Returns:
      whether to use the HTTP/2 implementation based on multiplexed channel
    • setMultiplexImplementation

      public Http2ServerConfig setMultiplexImplementation(boolean multiplexImplementation)
      Set which HTTP/2 implementation to use
      Parameters:
      multiplexImplementation - whether to use the HTTP/2 multiplex implementation
      Returns:
      a reference to this, so the API can be used fluently
    • getInitialSettings

      public Http2Settings getInitialSettings()
      Returns:
      the initial HTTP/2 connection settings
    • setInitialSettings

      public Http2ServerConfig setInitialSettings(Http2Settings settings)
      Set the HTTP/2 connection settings immediatly sent by the server when a client connects.
      Parameters:
      settings - the settings value
      Returns:
      a reference to this, so the API can be used fluently