public final class Settings
extends java.lang.Object
connection
scoped.Modifier and Type | Field and Description |
---|---|
(package private) static int |
COUNT
Total number of settings.
|
(package private) static int |
DEFAULT_INITIAL_WINDOW_SIZE
From the HTTP/2 specs, the default initial window size for all streams is 64 KiB.
|
(package private) static int |
ENABLE_PUSH
HTTP/2: The peer must not send a PUSH_PROMISE frame when this is 0.
|
(package private) static int |
HEADER_TABLE_SIZE
HTTP/2: Size in bytes of the table used to decode the sender's header blocks.
|
(package private) static int |
INITIAL_WINDOW_SIZE
Window size in bytes.
|
(package private) static int |
MAX_CONCURRENT_STREAMS
Sender's maximum number of concurrent streams.
|
(package private) static int |
MAX_FRAME_SIZE
HTTP/2: Size in bytes of the largest frame payload the sender will accept.
|
(package private) static int |
MAX_HEADER_LIST_SIZE
HTTP/2: Advisory only.
|
private int |
set
Bitfield of which flags that values.
|
private int[] |
values
Flag values.
|
Constructor and Description |
---|
Settings() |
Modifier and Type | Method and Description |
---|---|
(package private) void |
clear() |
(package private) int |
get(int id)
Returns the value for the setting
id , or 0 if unset. |
(package private) boolean |
getEnablePush(boolean defaultValue) |
(package private) int |
getHeaderTableSize()
Returns -1 if unset.
|
(package private) int |
getInitialWindowSize() |
(package private) int |
getMaxConcurrentStreams(int defaultValue) |
(package private) int |
getMaxFrameSize(int defaultValue) |
(package private) int |
getMaxHeaderListSize(int defaultValue) |
(package private) boolean |
isSet(int id)
Returns true if a value has been assigned for the setting
id . |
(package private) void |
merge(Settings other)
Writes
other into this. |
(package private) Settings |
set(int id,
int value) |
(package private) int |
size()
Returns the number of settings that have values assigned.
|
static final int DEFAULT_INITIAL_WINDOW_SIZE
static final int HEADER_TABLE_SIZE
static final int ENABLE_PUSH
static final int MAX_CONCURRENT_STREAMS
static final int MAX_FRAME_SIZE
static final int MAX_HEADER_LIST_SIZE
static final int INITIAL_WINDOW_SIZE
static final int COUNT
private int set
private final int[] values
void clear()
Settings set(int id, int value)
boolean isSet(int id)
id
.int get(int id)
id
, or 0 if unset.int size()
int getHeaderTableSize()
boolean getEnablePush(boolean defaultValue)
int getMaxConcurrentStreams(int defaultValue)
int getMaxFrameSize(int defaultValue)
int getMaxHeaderListSize(int defaultValue)
int getInitialWindowSize()
void merge(Settings other)
other
into this. If any setting is populated by this and other
, the
value and flags from other
will be kept.