Package io.github.mahmoudimus.http2
Class Http2Settings.Builder
java.lang.Object
io.github.mahmoudimus.http2.Http2Settings.Builder
- Enclosing class:
Http2Settings
Builds
Http2Settings, starting from the protocol's initial values.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates immutable settings, checking their protocol ranges.enableConnectProtocol(boolean v) Sets extended CONNECT permission.enablePush(boolean v) Sets server push permission.headerTableSize(long v) Sets the HPACK table limit.initialWindowSize(int v) Sets the initial stream credit.maxConcurrentStreams(long v) Sets the concurrent stream limit.maxFrameSize(int v) Sets the maximum frame payload.maxHeaderListSize(long v) Sets the decoded field section limit.
-
Method Details
-
headerTableSize
Sets the HPACK table limit.- Parameters:
v- the peer HPACK table limit in octets, from 0 to 2^32-1- Returns:
- this builder
-
enablePush
Sets server push permission.- Parameters:
v- whether server push is permitted- Returns:
- this builder
-
maxConcurrentStreams
Sets the concurrent stream limit.- Parameters:
v- the concurrent stream limit, or UNLIMITED- Returns:
- this builder
-
initialWindowSize
Sets the initial stream credit.- Parameters:
v- the initial stream credit in octets, from 0 to 2^31-1- Returns:
- this builder
-
maxFrameSize
Sets the maximum frame payload.- Parameters:
v- the maximum frame payload in octets, from 2^14 to 2^24-1- Returns:
- this builder
-
maxHeaderListSize
Sets the decoded field section limit.- Parameters:
v- the decoded field section limit in octets, or UNLIMITED- Returns:
- this builder
-
enableConnectProtocol
Sets extended CONNECT permission.- Parameters:
v- whether extended CONNECT is permitted- Returns:
- this builder
-
build
Creates immutable settings, checking their protocol ranges.- Returns:
- the configured settings
- Throws:
IllegalArgumentException- if a configured value is outside its protocol range
-