Package 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 Description static booleanDEFAULT_ENABLE_PUSHDefault HTTP/2 spec value forisPushEnabled():truestatic Map<Integer,Long>DEFAULT_EXTRA_SETTINGSDefault HTTP/2 spec value forgetExtraSettings():nullstatic longDEFAULT_HEADER_TABLE_SIZEDefault HTTP/2 spec value forgetHeaderTableSize():4096static intDEFAULT_INITIAL_WINDOW_SIZEDefault HTTP/2 spec value forgetInitialWindowSize():65535static longDEFAULT_MAX_CONCURRENT_STREAMSDefault HTTP/2 spec value forgetMaxConcurrentStreams():0xFFFFFFFFLstatic intDEFAULT_MAX_FRAME_SIZEDefault HTTP/2 spec value forgetMaxFrameSize():16384static intDEFAULT_MAX_HEADER_LIST_SIZEDefault HTTP/2 spec value forgetMaxHeaderListSize():8192
-
Constructor Summary
Constructors Constructor Description Http2Settings()Default constructorHttp2Settings(Http2Settings other)Copy constructorHttp2Settings(JsonObject json)Create an settings from JSON
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Longget(int id)Return a setting value according to its identifier.Map<Integer,Long>getExtraSettings()longgetHeaderTableSize()intgetInitialWindowSize()longgetMaxConcurrentStreams()intgetMaxFrameSize()longgetMaxHeaderListSize()inthashCode()booleanisPushEnabled()Http2Settingsset(int id, long value)Set a settingvaluefor a given settingid.Http2SettingssetExtraSettings(Map<Integer,Long> settings)Set the extra setting used for extending HTTP/2Http2SettingssetHeaderTableSize(long headerTableSize)Set SETTINGS_HEADER_TABLE_SIZE HTTP/2 setting.Http2SettingssetInitialWindowSize(int initialWindowSize)Set the SETTINGS_INITIAL_WINDOW_SIZE HTTP/2 settingHttp2SettingssetMaxConcurrentStreams(long maxConcurrentStreams)Set the SETTINGS_MAX_CONCURRENT_STREAMS HTTP/2 settingHttp2SettingssetMaxFrameSize(int maxFrameSize)Set the SETTINGS_MAX_FRAME_SIZE HTTP/2 settingHttp2SettingssetMaxHeaderListSize(long maxHeaderListSize)Set the SETTINGS_MAX_HEADER_LIST_SIZE HTTP/2 settingHttp2SettingssetPushEnabled(boolean pushEnabled)Set the SETTINGS_ENABLE_PUSH HTTP/2 settingJsonObjecttoJson()StringtoString()
-
-
-
Field Detail
-
DEFAULT_HEADER_TABLE_SIZE
public static final long DEFAULT_HEADER_TABLE_SIZE
Default HTTP/2 spec value forgetHeaderTableSize():4096- See Also:
- Constant Field Values
-
DEFAULT_ENABLE_PUSH
public static final boolean DEFAULT_ENABLE_PUSH
Default HTTP/2 spec value forisPushEnabled():true- See Also:
- Constant Field Values
-
DEFAULT_MAX_CONCURRENT_STREAMS
public static final long DEFAULT_MAX_CONCURRENT_STREAMS
Default HTTP/2 spec value forgetMaxConcurrentStreams():0xFFFFFFFFL- See Also:
- Constant Field Values
-
DEFAULT_INITIAL_WINDOW_SIZE
public static final int DEFAULT_INITIAL_WINDOW_SIZE
Default HTTP/2 spec value forgetInitialWindowSize():65535- See Also:
- Constant Field Values
-
DEFAULT_MAX_FRAME_SIZE
public static final int DEFAULT_MAX_FRAME_SIZE
Default HTTP/2 spec value forgetMaxFrameSize():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 forgetMaxHeaderListSize():8192- See Also:
- Constant Field Values
-
DEFAULT_EXTRA_SETTINGS
public static final Map<Integer,Long> DEFAULT_EXTRA_SETTINGS
Default HTTP/2 spec value forgetExtraSettings():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 settingvaluefor a given settingid.- Parameters:
id- the setting idvalue- the setting value- Returns:
- a reference to this, so the API can be used fluently
-
toJson
public JsonObject toJson()
-
-