public class Http2Settings extends Object
The settings expose the parameters defined by the HTTP/2 specification, as well as extra settings for protocol extensions.
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() : 8192 |
Constructor and Description |
---|
Http2Settings()
Default constructor
|
Http2Settings(Http2Settings other)
Copy constructor
|
Http2Settings(JsonObject json)
Create an settings from JSON
|
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() |
public static final long DEFAULT_HEADER_TABLE_SIZE
getHeaderTableSize()
: 4096
public static final boolean DEFAULT_ENABLE_PUSH
isPushEnabled()
: true
public static final long DEFAULT_MAX_CONCURRENT_STREAMS
getMaxConcurrentStreams()
: 0xFFFFFFFFL
public static final int DEFAULT_INITIAL_WINDOW_SIZE
getInitialWindowSize()
: 65535
public static final int DEFAULT_MAX_FRAME_SIZE
getMaxFrameSize()
: 16384
public static final int DEFAULT_MAX_HEADER_LIST_SIZE
getMaxHeaderListSize()
: 8192
public static final Map<Integer,Long> DEFAULT_EXTRA_SETTINGS
getExtraSettings()
: null
public Http2Settings()
public Http2Settings(JsonObject json)
json
- the JSONpublic Http2Settings(Http2Settings other)
other
- the settings to copypublic long getHeaderTableSize()
public Http2Settings setHeaderTableSize(long headerTableSize)
headerTableSize
- the new valuepublic boolean isPushEnabled()
public Http2Settings setPushEnabled(boolean pushEnabled)
pushEnabled
- the new valuepublic long getMaxConcurrentStreams()
public Http2Settings setMaxConcurrentStreams(long maxConcurrentStreams)
maxConcurrentStreams
- the new valuepublic int getInitialWindowSize()
public Http2Settings setInitialWindowSize(int initialWindowSize)
initialWindowSize
- the new valuepublic int getMaxFrameSize()
public Http2Settings setMaxFrameSize(int maxFrameSize)
maxFrameSize
- the new valuepublic long getMaxHeaderListSize()
public Http2Settings setMaxHeaderListSize(long maxHeaderListSize)
maxHeaderListSize
- the new valuepublic Map<Integer,Long> getExtraSettings()
public Http2Settings setExtraSettings(Map<Integer,Long> settings)
settings
- the new extra settingspublic Long get(int id)
id
- the setting identifierpublic Http2Settings set(int id, long value)
value
for a given setting id
.id
- the setting idvalue
- the setting valuepublic JsonObject toJson()
Copyright © 2021 Eclipse. All rights reserved.