Package io.servicetalk.http.netty
Class H1ProtocolConfigBuilder
java.lang.Object
io.servicetalk.http.netty.H1ProtocolConfigBuilder
Builder for
H1ProtocolConfig
.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
BuildsH1ProtocolConfig
.headersEncodedSizeEstimate
(int headersEncodedSizeEstimate) Sets the value used to calculate an exponential moving average of the encoded size of the HTTP start line and header fields for a guess for future buffer allocations.headersFactory
(HttpHeadersFactory headersFactory) Sets theHttpHeadersFactory
to be used for creatingHttpHeaders
when decoding HTTP messages.maxHeaderFieldLength
(int maxHeaderFieldLength) Sets the maximum length of the HTTP header fields and trailer fields to parse.maxPipelinedRequests
(int maxPipelinedRequests) Sets the maximum number of pipelined HTTP requests to queue up.maxStartLineLength
(int maxStartLineLength) Sets the maximum length of the HTTP start line for an HTTP message.specExceptions
(H1SpecExceptions specExceptions) Sets additional exceptions for HTTP/1.1 specification.trailersEncodedSizeEstimate
(int trailersEncodedSizeEstimate) Sets the value used to calculate an exponential moving average of the encoded size of the HTTP trailer fields for a guess for future buffer allocations.
-
Method Details
-
headersFactory
Sets theHttpHeadersFactory
to be used for creatingHttpHeaders
when decoding HTTP messages.- Parameters:
headersFactory
-HttpHeadersFactory
to be used for creatingHttpHeaders
when decoding HTTP messages- Returns:
this
-
maxPipelinedRequests
Sets the maximum number of pipelined HTTP requests to queue up.Anything above this value will be rejected,
1
means pipelining is disabled and requests/responses are processed sequentially.Note:
reserved connections
will not be restricted by this setting.- Parameters:
maxPipelinedRequests
- maximum number of pipelined requests to queue up- Returns:
this
-
maxStartLineLength
Sets the maximum length of the HTTP start line for an HTTP message.Note: a decoder will close the connection with
TooLongFrameException
if the start line exceeds this value.- Parameters:
maxStartLineLength
- maximum size of the HTTP start line for an HTTP message- Returns:
this
-
maxHeaderFieldLength
Sets the maximum length of the HTTP header fields and trailer fields to parse.Note: a decoder will close the connection with
TooLongFrameException
if the length of a header or trailer field exceeds this value.- Parameters:
maxHeaderFieldLength
- maximum length of HTTP header fields and trailer fields to parse- Returns:
this
-
headersEncodedSizeEstimate
Sets the value used to calculate an exponential moving average of the encoded size of the HTTP start line and header fields for a guess for future buffer allocations.- Parameters:
headersEncodedSizeEstimate
- value used to calculate an exponential moving average of the encoded size of the HTTP start line and header fields- Returns:
this
-
trailersEncodedSizeEstimate
Sets the value used to calculate an exponential moving average of the encoded size of the HTTP trailer fields for a guess for future buffer allocations.- Parameters:
trailersEncodedSizeEstimate
- value used to calculate an exponential moving average of the encoded size of the HTTP trailer fields- Returns:
this
-
specExceptions
Sets additional exceptions for HTTP/1.1 specification.- Parameters:
specExceptions
- exceptions for HTTP/1.1 specification- Returns:
this
-
build
BuildsH1ProtocolConfig
.- Returns:
- a new
H1ProtocolConfig
-