io.vertx.core.http

## Class Http2Settings

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

-     public class Http2Settings
      extends Object

  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 Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static boolean` | `DEFAULT_ENABLE_PUSH` Default HTTP/2 spec value for `isPushEnabled()` : `true`
    `static Map<Integer,Long>` | `DEFAULT_EXTRA_SETTINGS` Default HTTP/2 spec value for `getExtraSettings()` : `null`
    `static long` | `DEFAULT_HEADER_TABLE_SIZE` Default HTTP/2 spec value for `getHeaderTableSize()` : `4096`
    `static int` | `DEFAULT_INITIAL_WINDOW_SIZE` Default HTTP/2 spec value for `getInitialWindowSize()` : `65535`
    `static long` | `DEFAULT_MAX_CONCURRENT_STREAMS` Default HTTP/2 spec value for `getMaxConcurrentStreams()` : `0xFFFFFFFFL`
    `static int` | `DEFAULT_MAX_FRAME_SIZE` Default HTTP/2 spec value for `getMaxFrameSize()` : `16384`
    `static int` | `DEFAULT_MAX_HEADER_LIST_SIZE` Default HTTP/2 spec value for `getMaxHeaderListSize()` : `Integer.MAX_VALUE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Http2Settings()` Default constructor
    `Http2Settings(Http2Settings other)` Copy constructor
    `Http2Settings(JsonObject json)` Create an settings from JSON

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `Long` | `get(int id)` Return a setting value according to its identifier.
    `Map<Integer,Long>` | `getExtraSettings()`
    `long` | `getHeaderTableSize()`
    `int` | `getInitialWindowSize()`
    `long` | `getMaxConcurrentStreams()`
    `int` | `getMaxFrameSize()`
    `long` | `getMaxHeaderListSize()`
    `int` | `hashCode()`
    `boolean` | `isPushEnabled()`
    `Http2Settings` | `set(int id, long value)` Set a setting `value` for a given setting `id`.
    `Http2Settings` | `setExtraSettings(Map<Integer,Long> settings)` Set the extra setting used for extending HTTP/2
    `Http2Settings` | `setHeaderTableSize(long headerTableSize)` Set SETTINGS_HEADER_TABLE_SIZE HTTP/2 setting.
    `Http2Settings` | `setInitialWindowSize(int initialWindowSize)` Set the SETTINGS_INITIAL_WINDOW_SIZE HTTP/2 setting
    `Http2Settings` | `setMaxConcurrentStreams(long maxConcurrentStreams)` Set the SETTINGS_MAX_CONCURRENT_STREAMS HTTP/2 setting
    `Http2Settings` | `setMaxFrameSize(int maxFrameSize)` Set the SETTINGS_MAX_FRAME_SIZE HTTP/2 setting
    `Http2Settings` | `setMaxHeaderListSize(long maxHeaderListSize)` Set the SETTINGS_MAX_HEADER_LIST_SIZE HTTP/2 setting
    `Http2Settings` | `setPushEnabled(boolean pushEnabled)` Set the SETTINGS_ENABLE_PUSH HTTP/2 setting
    `JsonObject` | `toJson()`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_HEADER_TABLE_SIZE

          public static final long DEFAULT_HEADER_TABLE_SIZE

      Default HTTP/2 spec value for `getHeaderTableSize()` : `4096`
      See Also:
        Constant Field Values

    - #### DEFAULT_ENABLE_PUSH

          public static final boolean DEFAULT_ENABLE_PUSH

      Default HTTP/2 spec value for `isPushEnabled()` : `true`
      See Also:
        Constant Field Values

    - #### DEFAULT_MAX_CONCURRENT_STREAMS

          public static final long DEFAULT_MAX_CONCURRENT_STREAMS

      Default HTTP/2 spec value for `getMaxConcurrentStreams()` : `0xFFFFFFFFL`
      See Also:
        Constant Field Values

    - #### DEFAULT_INITIAL_WINDOW_SIZE

          public static final int DEFAULT_INITIAL_WINDOW_SIZE

      Default HTTP/2 spec value for `getInitialWindowSize()` : `65535`
      See Also:
        Constant Field Values

    - #### DEFAULT_MAX_FRAME_SIZE

          public static final int DEFAULT_MAX_FRAME_SIZE

      Default HTTP/2 spec value for `getMaxFrameSize()` : `16384`
      See Also:
        Constant Field Values

    - #### DEFAULT_MAX_HEADER_LIST_SIZE

          public static final int DEFAULT_MAX_HEADER_LIST_SIZE

      Default HTTP/2 spec value for `getMaxHeaderListSize()` : `Integer.MAX_VALUE`
      See Also:
        Constant Field Values

    - #### DEFAULT_EXTRA_SETTINGS

          public static final Map<Integer,Long> DEFAULT_EXTRA_SETTINGS

      Default HTTP/2 spec value for `getExtraSettings()` : `null`

  - ### Constructor Detail

    - #### 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 Detail

    - #### 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

    - #### 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()

Copyright © 2019 Eclipse. All rights reserved.