Class Http2Settings

java.lang.Object
io.vertx.core.http.HttpSettings
io.vertx.core.http.Http2Settings

public final class Http2Settings extends HttpSettings
HTTP2 settings, the settings is initialized with the default HTTP/2 values.

The settings expose the parameters defined by the HTTP/2 specification, as well as extra settings for protocol extensions.

Author:
Julien Viet
  • Field Details

  • Constructor Details

    • Http2Settings

      public Http2Settings()
      Default constructor
    • Http2Settings

      public Http2Settings(JsonObject json)
      Create an settings from JSON
      Parameters:
      json - the JSON
    • Http2Settings

      public Http2Settings(Http2Settings other)
      Copy constructor
      Parameters:
      other - the settings to copy
  • Method Details

    • copy

      public Http2Settings copy()
      Specified by:
      copy in class HttpSettings
    • getHeaderTableSize

      public long getHeaderTableSize()
      Returns:
      the SETTINGS_HEADER_TABLE_SIZE HTTP/2 setting
    • setHeaderTableSize

      public Http2Settings setHeaderTableSize(long headerTableSize)
      Set SETTINGS_HEADER_TABLE_SIZE HTTP/2 setting.
      Parameters:
      headerTableSize - the new value
      Returns:
      a reference to this, so the API can be used fluently
    • isPushEnabled

      public boolean isPushEnabled()
      Returns:
      the SETTINGS_ENABLE_PUSH HTTP/2 setting
    • setPushEnabled

      public Http2Settings setPushEnabled(boolean pushEnabled)
      Set the SETTINGS_ENABLE_PUSH HTTP/2 setting
      Parameters:
      pushEnabled - the new value
      Returns:
      a reference to this, so the API can be used fluently
    • getMaxConcurrentStreams

      public long getMaxConcurrentStreams()
      Returns:
      the SETTINGS_MAX_CONCURRENT_STREAMS HTTP/2 setting
    • setMaxConcurrentStreams

      public Http2Settings setMaxConcurrentStreams(long maxConcurrentStreams)
      Set the SETTINGS_MAX_CONCURRENT_STREAMS HTTP/2 setting
      Parameters:
      maxConcurrentStreams - the new value
      Returns:
      a reference to this, so the API can be used fluently
    • getInitialWindowSize

      public int getInitialWindowSize()
      Returns:
      the SETTINGS_INITIAL_WINDOW_SIZE HTTP/2 setting
    • setInitialWindowSize

      public Http2Settings setInitialWindowSize(int initialWindowSize)
      Set the SETTINGS_INITIAL_WINDOW_SIZE HTTP/2 setting
      Parameters:
      initialWindowSize - the new value
      Returns:
      a reference to this, so the API can be used fluently
    • getMaxFrameSize

      public int getMaxFrameSize()
      Returns:
      the SETTINGS_MAX_FRAME_SIZE HTTP/2 setting
    • setMaxFrameSize

      public Http2Settings setMaxFrameSize(int maxFrameSize)
      Set the SETTINGS_MAX_FRAME_SIZE HTTP/2 setting
      Parameters:
      maxFrameSize - the new value
      Returns:
      a reference to this, so the API can be used fluently
    • getMaxHeaderListSize

      public long getMaxHeaderListSize()
      Returns:
      the SETTINGS_MAX_HEADER_LIST_SIZE HTTP/2 setting
    • setMaxHeaderListSize

      public Http2Settings setMaxHeaderListSize(long maxHeaderListSize)
      Set the SETTINGS_MAX_HEADER_LIST_SIZE HTTP/2 setting
      Parameters:
      maxHeaderListSize - the new value
      Returns:
      a reference to this, so the API can be used fluently
    • getExtraSettings

      public Map<Integer,Long> getExtraSettings()
      Returns:
      the extra settings used for extending HTTP/2
    • setExtraSettings

      public Http2Settings setExtraSettings(Map<Integer,Long> settings)
      Set the extra setting used for extending HTTP/2
      Parameters:
      settings - the new extra settings
      Returns:
      a reference to this, so the API can be used fluently
    • get

      public Long get(int id)
      Return a setting value according to its identifier.
      Parameters:
      id - the setting identifier
      Returns:
      the setting value
    • set

      public Http2Settings set(int id, long value)
      Set a setting value for a given setting id.
      Parameters:
      id - the setting id
      value - the setting value
      Returns:
      a reference to this, so the API can be used fluently
    • set

      public <T> Http2Settings set(HttpSetting<T> setting, T value)
      Description copied from class: HttpSettings
      Set the setting value with <T>.
      Overrides:
      set in class HttpSettings
      Parameters:
      setting - the setting
      value - the java value
      Returns:
      a reference to this, so the API can be used fluently
    • setLong

      public Http2Settings setLong(HttpSetting<?> setting, long value)
      Description copied from class: HttpSettings
      Set the setting value with long.
      Overrides:
      setLong in class HttpSettings
      Parameters:
      setting - the setting
      value - the raw value
      Returns:
      a reference to this, so the API can be used fluently
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toJson

      public JsonObject toJson()