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 boolean
DEFAULT_ENABLE_PUSH
Default HTTP/2 spec value forisPushEnabled()
:true
static Map<Integer,Long>
DEFAULT_EXTRA_SETTINGS
Default HTTP/2 spec value forgetExtraSettings()
:null
static long
DEFAULT_HEADER_TABLE_SIZE
Default HTTP/2 spec value forgetHeaderTableSize()
:4096
static int
DEFAULT_INITIAL_WINDOW_SIZE
Default HTTP/2 spec value forgetInitialWindowSize()
:65535
static long
DEFAULT_MAX_CONCURRENT_STREAMS
Default HTTP/2 spec value forgetMaxConcurrentStreams()
:0xFFFFFFFFL
static int
DEFAULT_MAX_FRAME_SIZE
Default HTTP/2 spec value forgetMaxFrameSize()
:16384
static int
DEFAULT_MAX_HEADER_LIST_SIZE
Default 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 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 settingvalue
for a given settingid
.Http2Settings
setExtraSettings(Map<Integer,Long> settings)
Set the extra setting used for extending HTTP/2Http2Settings
setHeaderTableSize(long headerTableSize)
Set SETTINGS_HEADER_TABLE_SIZE HTTP/2 setting.Http2Settings
setInitialWindowSize(int initialWindowSize)
Set the SETTINGS_INITIAL_WINDOW_SIZE HTTP/2 settingHttp2Settings
setMaxConcurrentStreams(long maxConcurrentStreams)
Set the SETTINGS_MAX_CONCURRENT_STREAMS HTTP/2 settingHttp2Settings
setMaxFrameSize(int maxFrameSize)
Set the SETTINGS_MAX_FRAME_SIZE HTTP/2 settingHttp2Settings
setMaxHeaderListSize(long maxHeaderListSize)
Set the SETTINGS_MAX_HEADER_LIST_SIZE HTTP/2 settingHttp2Settings
setPushEnabled(boolean pushEnabled)
Set the SETTINGS_ENABLE_PUSH HTTP/2 settingJsonObject
toJson()
String
toString()
-
-
-
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 settingvalue
for 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()
-
-