Class NettyHttpServerConfiguration.Http2Settings

java.lang.Object
io.micronaut.http.server.netty.configuration.NettyHttpServerConfiguration.Http2Settings
Enclosing class:
NettyHttpServerConfiguration

@ConfigurationProperties("http2") public static class NettyHttpServerConfiguration.Http2Settings extends Object
Http2 settings.
Since:
1.0
Author:
Graeme Rocher
  • Constructor Details

    • Http2Settings

      public Http2Settings()
  • Method Details

    • http2Settings

      public io.netty.handler.codec.http2.Http2Settings http2Settings()
      Returns netty's http2 settings.
      Returns:
      io.netty.handler.codec.http2.Http2Settings.
    • getHeaderTableSize

      public Long getHeaderTableSize()
      Gets the SETTINGS_HEADER_TABLE_SIZE value. If unavailable, returns null.
      Returns:
      The header table size or null.
    • setHeaderTableSize

      public void setHeaderTableSize(@Nullable Long value)
      Sets the SETTINGS_HEADER_TABLE_SIZE value.
      Parameters:
      value - The header table size.
      Throws:
      IllegalArgumentException - if verification of the setting fails.
    • getPushEnabled

      @Deprecated public Boolean getPushEnabled()
      Deprecated.
      The SETTINGS_ENABLE_PUSH setting makes no sense when sent by the server, and clients must reject any setting except false (the default) according to the spec.
      Gets the SETTINGS_ENABLE_PUSH value. If unavailable, returns null.
      Returns:
      The SETTINGS_ENABLE_PUSH value. If unavailable, returns null.
    • setPushEnabled

      @Deprecated public void setPushEnabled(Boolean enabled)
      Deprecated.
      The SETTINGS_ENABLE_PUSH setting makes no sense when sent by the server, and clients must reject any setting except false (the default) according to the spec. Netty will refuse to write this setting altogether. To prevent this, this setter now does nothing and will be removed in a future release.
      Does nothing.
      Parameters:
      enabled - The SETTINGS_ENABLE_PUSH value.
    • getMaxConcurrentStreams

      public Long getMaxConcurrentStreams()
      Gets the SETTINGS_MAX_CONCURRENT_STREAMS value. If unavailable, returns null.
      Returns:
      The SETTINGS_MAX_CONCURRENT_STREAMS value. If unavailable, returns null.
    • setMaxConcurrentStreams

      public void setMaxConcurrentStreams(Long value)
      Sets the SETTINGS_MAX_CONCURRENT_STREAMS value.
      Parameters:
      value - The SETTINGS_MAX_CONCURRENT_STREAMS value.
      Throws:
      IllegalArgumentException - if verification of the setting fails.
    • getInitialWindowSize

      public Integer getInitialWindowSize()
      Gets the SETTINGS_INITIAL_WINDOW_SIZE value. If unavailable, returns null.
      Returns:
      The SETTINGS_INITIAL_WINDOW_SIZE value. If unavailable, returns null.
    • setInitialWindowSize

      public void setInitialWindowSize(@Nullable Integer value)
      Sets the SETTINGS_INITIAL_WINDOW_SIZE value.
      Parameters:
      value - The SETTINGS_INITIAL_WINDOW_SIZE value.
      Throws:
      IllegalArgumentException - if verification of the setting fails.
    • getInitialConnectionWindowSize

      public @Nullable Integer getInitialConnectionWindowSize()
      Gets the initial flow-control window size of the connection as a whole. If not configured, returns null.
      Returns:
      The connection window size or null.
      Since:
      5.2.2
      See Also:
    • setInitialConnectionWindowSize

      public void setInitialConnectionWindowSize(@Nullable Integer value)
      Sets the initial flow-control window size of the connection as a whole (HTTP/2 stream 0), i.e. how many request body bytes a client may send across all streams of one connection before the server has to acknowledge them with a WINDOW_UPDATE.

      SETTINGS_INITIAL_WINDOW_SIZE (setInitialWindowSize(Integer)) only applies to individual streams. The connection window always starts at the protocol default of 65535 bytes, which caps the combined upload throughput of all streams on a connection at about 64 KiB per round trip unless it is raised. By default, the connection window is raised by twice the amount by which initial-window-size exceeds 65535, so that a single stream cannot use up the whole connection window; this is the same rule netty's Http2FrameCodec applies. This property raises the connection window further, to the given number of bytes; it has no effect when the default derived from the stream window is already larger. The value must be at least 65535 and at most 2^31-1; the connection window can only be raised above the protocol default, never lowered.

      Parameters:
      value - The connection window size in bytes.
      Throws:
      IllegalArgumentException - if the value is out of range.
      Since:
      5.2.2
    • getMaxFrameSize

      public Integer getMaxFrameSize()
      Gets the SETTINGS_MAX_FRAME_SIZE value. If unavailable, returns null.
      Returns:
      The SETTINGS_MAX_FRAME_SIZE value. If unavailable, returns null.
    • setMaxFrameSize

      public void setMaxFrameSize(@Nullable Integer value)
      Sets the SETTINGS_MAX_FRAME_SIZE value.
      Parameters:
      value - The SETTINGS_MAX_FRAME_SIZE value.
      Throws:
      IllegalArgumentException - if verification of the setting fails.
    • getMaxHeaderListSize

      public Long getMaxHeaderListSize()
      Gets the SETTINGS_MAX_HEADER_LIST_SIZE value. If unavailable, returns null.
      Returns:
      The SETTINGS_MAX_HEADER_LIST_SIZE value. If unavailable, returns null.
    • setMaxHeaderListSize

      public void setMaxHeaderListSize(Long value)
      Sets the SETTINGS_MAX_HEADER_LIST_SIZE value.
      Parameters:
      value - The SETTINGS_MAX_HEADER_LIST_SIZE value.
      Throws:
      IllegalArgumentException - if verification of the setting fails.